Files
ladybird/Libraries/LibCore/EventLoopImplementationUnix.h
Zaggy1024 04e95b7dd1 LibCore: Avoid UAF on the array of wake pipes when exit()ing
If exit() is called on a thread with an EventLoop in the stack, the
ThreadData storing the array of wake pipes will be destroyed first.
Threads can still take a strong reference to the EventLoop after that,
and will read the fds from freed memory.

Instead, take a copy of the write fd, and swallow EBADF when writing to
it, since that only indicates that the thread and event loop are
exiting, so there's nothing to do with the wake.
2026-03-02 17:06:39 -06:00

1.9 KiB