[PATCH 0/3] signal: HANDLER_EXIT should clear SIGNAL_UNKILLABLE

From: Kees Cook
Date: Wed Feb 09 2022 - 21:53:28 EST


Hi,

This fixes the signal refactoring to actually kill unkillable processes
when receiving a fatal SIGSYS from seccomp. Thanks to Robert for the
report and Eric for the fix! I've also tweaked seccomp internal a bit to
fail more safely. This was a partial seccomp bypass, in the sense that
SECCOMP_RET_KILL_* didn't kill the process, but it didn't bypass other
aspects of the filters. (i.e. the syscall was still blocked, etc.)

I'll be sending this to Linus after a bit more testing...

Thanks,

-Kees

Kees Cook (3):
signal: HANDLER_EXIT should clear SIGNAL_UNKILLABLE
seccomp: Invalidate seccomp mode to catch death failures
samples/seccomp: Adjust sample to also provide kill option

kernel/seccomp.c | 10 ++++++++++
kernel/signal.c | 5 +++--
samples/seccomp/dropper.c | 9 +++++++--
3 files changed, 20 insertions(+), 4 deletions(-)

--
2.30.2