diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2026-04-06 15:37:32 +0200 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-09-21 21:26:10 -0700 |
| commit | d72e0fb3b00c6a1146bcfd7186ad9f6f609ba236 (patch) | |
| tree | e647d52e14e0d856aef66119f00055081455d5c7 /tools/perf/python/stackcollapse.py | |
| parent | 3555409e524a0279845f91273ba714998658c163 (diff) | |
| download | linux-next-d72e0fb3b00c6a1146bcfd7186ad9f6f609ba236.tar.gz linux-next-d72e0fb3b00c6a1146bcfd7186ad9f6f609ba236.zip | |
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.
Cc: stable@kernel.org
Reported-by: syzbot+0a4c46806941297fecb9@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=0a4c46806941297fecb9
Tested-by: syzbot+0a4c46806941297fecb9@syzkaller.appspotmail.com
Link: https://lore.kernel.org/all/69d122fd.050a0220.2dbe29.001c.GAE@google.com/
Suggested-by: Kusaram Devineni <kusaram@devineni.in>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/adO3HG8bvwRPcmte@redhat.com
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
