signal: HANDLER_EXIT should clear SIGNAL_UNKILLABLE
authorKees Cook <keescook@chromium.org>
Tue, 8 Feb 2022 08:57:17 +0000 (00:57 -0800)
committerKees Cook <keescook@chromium.org>
Fri, 11 Feb 2022 03:08:54 +0000 (19:08 -0800)
commit5c72263ef2fbe99596848f03758ae2dc593adf2c
tree60249a1e125168780858cad5f5cebb87338f49ed
parent26291c54e111ff6ba87a164d85d4a4e134b7315c
signal: HANDLER_EXIT should clear SIGNAL_UNKILLABLE

Fatal SIGSYS signals (i.e. seccomp RET_KILL_* syscall filter actions)
were not being delivered to ptraced pid namespace init processes. Make
sure the SIGNAL_UNKILLABLE doesn't get set for these cases.

Reported-by: Robert Święcki <robert@swiecki.net>
Suggested-by: "Eric W. Biederman" <ebiederm@xmission.com>
Fixes: 00b06da29cf9 ("signal: Add SA_IMMUTABLE to ensure forced siganls do not get changed")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Link: https://lore.kernel.org/lkml/878rui8u4a.fsf@email.froward.int.ebiederm.org
kernel/signal.c