ladybird/Kernel/Net
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
..
ARP.h
E1000NetworkAdapter.cpp Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
E1000NetworkAdapter.h Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
EthernetFrameHeader.h Net: Try to reuse incoming packet buffers to avoid allocation churn 2019-12-14 11:07:37 +01:00
EtherType.h Kernel: Ignore IPv6 packets; log unknown Ethernet payload types 2019-08-29 06:25:06 +02:00
ICMP.h
IPv4.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
IPv4Socket.cpp Kernel: Fix kernel null deref on process crash during join_thread() 2020-01-10 19:23:45 +01:00
IPv4Socket.h IPv4: Only buffer payload bytes for SOCK_STREAM sockets 2019-12-14 09:43:31 +01:00
IPv4SocketTuple.h Kernel: Refactor TCP/IP stack 2019-08-06 16:21:17 +02:00
LocalSocket.cpp Kernel: Fix kernel null deref on process crash during join_thread() 2020-01-10 19:23:45 +01:00
LocalSocket.h Kernel: Make LocalSocket pre-bind GID be gid_t (#1012) 2020-01-04 10:05:01 +01:00
LoopbackAdapter.cpp Kernel+ifconfig: Add an MTU value to NetworkAdapter 2019-11-28 14:14:26 +01:00
LoopbackAdapter.h
MACAddress.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
NetworkAdapter.cpp Kernel: Route all loopback traffic through the loopback adapter 2019-12-28 02:03:38 +01:00
NetworkAdapter.h Net: Try to reuse incoming packet buffers to avoid allocation churn 2019-12-14 11:07:37 +01:00
NetworkTask.cpp Kernel: Fix code locked behind NETWORK_TASK_DEBUG 2019-12-28 02:03:49 +01:00
NetworkTask.h
Routing.cpp Kernel: Route all loopback traffic through the loopback adapter 2019-12-28 02:03:38 +01:00
Routing.h Kernel: Implement is_zero for RoutingDecision 2019-08-29 06:25:06 +02:00
RTL8139NetworkAdapter.cpp Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
RTL8139NetworkAdapter.h Kernel: Create support for PCI ECAM 2020-01-02 00:50:09 +01:00
Socket.cpp Kernel: Make Socket::absolute_path() pure virtual 2020-01-07 10:24:45 +01:00
Socket.h Kernel: Make Socket::absolute_path() pure virtual 2020-01-07 10:24:45 +01:00
TCP.h Kernel: Refactor TCP/IP stack 2019-08-06 16:21:17 +02:00
TCPSocket.cpp Kernel: Fix kernel null deref on process crash during join_thread() 2020-01-10 19:23:45 +01:00
TCPSocket.h IPv4: Protect the list of unacked TCP packets with a lock 2019-11-23 21:44:47 +01:00
UDP.h
UDPSocket.cpp Kernel: Add a more expressive API for getting random bytes 2020-01-03 12:43:07 +01:00
UDPSocket.h Kernel: Move socket role tracking to the Socket class itself 2019-08-11 16:30:43 +02:00