]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 Apr 2022 09:32:10 +0000 (11:32 +0200)
commit9e6a3d47fc89d6b24e9ed6b531051a0e0e0f42d9
tree70a39b83fc83b852806f0a403c88f8e902db7d11
parent3868235031919cf3bbb1a3c097d01466a6cccb81
seccomp: Invalidate seccomp mode to catch death failures

BugLink: https://bugs.launchpad.net/bugs/1966118
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/seccomp.c