]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp: Invalidate seccomp mode to catch death failures
authorKees Cook <keescook@chromium.org>
Tue, 8 Feb 2022 04:21:13 +0000 (20:21 -0800)
committerKees Cook <keescook@chromium.org>
Fri, 11 Feb 2022 03:09:12 +0000 (19:09 -0800)
commit8a9adc9e0038e27cca4e5855cc379f979d5e84cd
tree5af379028a8b12efb8193fee1737ea4ebe968969
parentf73617c1883898398fffe9d148b4475f98a0043d
seccomp: Invalidate seccomp mode to catch death failures

If seccomp tries to kill a process, it should never see that process
again. To enforce this proactively, switch the mode to something
impossible. If encountered: WARN, reject all syscalls, and attempt to
kill the process again even harder.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Fixes: ced1adc9a997 ("seccomp: remove 2-phase API")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
kernel/seccomp.c