ladybird/Tests/Kernel
Andreas Kling 8c5cd97b45 Kernel: Fix kernel null deref on process crash during join_thread()
The join_thread() syscall is not supposed to be interruptible by
signals, but it was. And since the process death mechanism piggybacked
on signal interrupts, it was possible to interrupt a pthread_join() by
killing the process that was doing it, leading to confusing due to some
assumptions being made by Thread::finalize() for threads that have a
pending joiner.

This patch fixes the issue by making "interrupted by death" a distinct
block result separate from "interrupted by signal". Then we handle that
state in join_thread() and tidy things up so that thread finalization
doesn't get confused by the pending joiner being gone.

Test: Tests/Kernel/null-deref-crash-during-pthread_join.cpp
2020-01-10 19:23:45 +01:00
..
mmap-write-into-running-programs-executable-file.cpp Kernel: Validate PROT_READ and PROT_WRITE against underlying file 2020-01-07 19:32:32 +01:00
null-deref-close-during-select.cpp Kernel: Ignore closed fd's when considering select() unblock 2020-01-09 12:36:42 +01:00
null-deref-crash-during-pthread_join.cpp Kernel: Fix kernel null deref on process crash during join_thread() 2020-01-10 19:23:45 +01:00
uaf-close-while-blocked-in-read.cpp Kernel: Make Process::file_description() vend a RefPtr<FileDescription> 2020-01-07 15:53:42 +01:00