]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:51:47 +0000 (12:51 +0100)
commit255264d81da6edaf4cd4fab836d1ef3ba09af6aa
tree80c9c20c0a4a9a41831aed06eb8c0a7b8c6cc6bb
parentfdc3301b1cdb2daa8ede8fada67e60dc51ca78a6
seccomp: Invalidate seccomp mode to catch death failures

commit 495ac3069a6235bfdf516812a2a9b256671bbdf9 upstream.

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: 8112c4f140fa ("seccomp: remove 2-phase API")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/seccomp.c