]> git.itanic.dy.fi Git - linux-stable/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:44:52 +0000 (12:44 +0100)
commitb39e0213e5bee909cdfec569e071f5bc3060af12
treef114d965941357a646a35718ac8d11ec88de8a64
parent2a6ae78ca0a24d157617ec8bc4040debf96b6604
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