signal: HANDLER_EXIT should clear SIGNAL_UNKILLABLE
authorKees Cook <keescook@chromium.org>
Tue, 8 Feb 2022 08:57:17 +0000 (00:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:56:38 +0000 (12:56 +0100)
commit56ca18dd5483a7056b83f277dd90a5db382191ab
treec06f0219ef8ffac2359622b4f8a41d3aa81295b6
parentf7a56fcca2e45917ea40ac2e864bf4e9fb2a51e4
signal: HANDLER_EXIT should clear SIGNAL_UNKILLABLE

commit 5c72263ef2fbe99596848f03758ae2dc593adf2c upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/signal.c