Re: [PATCH] signal: prevent evasion of SA_IMMUTABLE signals

From: Oleg Nesterov

Date: Wed Apr 29 2026 - 06:28:41 EST


On 04/29, Oleg Nesterov wrote:
>
> static int __send_signal_locked(int sig, struct kernel_siginfo *info,
> struct task_struct *t, enum pid_type type, bool force)
> {
> + bool immutable = sa_immutable(t->sighand, sig);

OK, sashiko.dev raised the valid concern,
https://sashiko.dev/#/patchset/afHBYTUA5XexTj-Q%40redhat.com

If a signal action is marked SA_IMMUTABLE (for example, by forcing a fatal
SIGSEGV), and another thread repeatedly sends the same signal via kill(),
the legacy_queue() check is bypassed.

This check should be more strict. I'll send V2.

Oleg.