In the Linux kernel, the following vulnerability has been resolved: signalfd: don't dequeue the forced fatal signals These signals should act like SIGKILL, in that userspace must never dequeue them. But as Kusaram explains, io_uring-driven signalfd_read_iter() called from get_signal() -> task_work_run() paths can do this before get_signal() has a chance to dequeue such a signal and notice SA_IMMUTABLE. Change signalfd_poll() and signalfd_dequeue() to add pending SA_IMMUTABLE signals to ctx->sigmask. TODO: we should probably change force_sig_info_to_task(HANDLER_EXIT) to make fatal_signal_pending() true, or add a fatal_or_forced_signal_pending() helper. Then signalfd_dequeue() could just return -EINTR in this case. This also makes sense for get_signal(), which could prioritize a fatal signal sent by (say) force_sig_seccomp(force_coredump => true), just like it already prioritizes SIGKILL.
https://git.kernel.org/stable/c/ffd5a804f79ef6f7e57f04ad226f356dbebd6986
https://git.kernel.org/stable/c/d72e0fb3b00c6a1146bcfd7186ad9f6f609ba236
https://git.kernel.org/stable/c/c94b8c634a50ba19b7e14c41da7bbe7b37187969
https://git.kernel.org/stable/c/bd3a2fe8da2365b1464e7a36fcf482d01407ce5b
https://git.kernel.org/stable/c/b4dfd3bb91a34d2591138e4b2d818ec6356a9901
https://git.kernel.org/stable/c/9e6d453f2ed87a8235d1f056c14df432f28c485d
https://git.kernel.org/stable/c/8f29113814727823aaa659c591525a0f6874d600