]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/seccomp.c
seccomp: handle arch inversion II
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 18 Apr 2018 13:20:21 +0000 (15:20 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 18 Apr 2018 14:00:54 +0000 (16:00 +0200)
commiteca6736eb019f33a6243fc20a61c658da0662827
tree851987c2cdff73bb9081e9b09c55ccee2b4ce0f6
parent7e84441ec3f973609bc2462528d55888ab1a084f
seccomp: handle arch inversion II

LXC generates and loads the seccomp-bpf filter in the host/container which
spawn the new container. In other words, userspace N is responsible for
generating and loading the seccomp-bpf filter which restricts userspace N + 1.
Assume 64bit kernel and 32bit userspace running a 64bit container. In this case
the 32-bit x86 userspace is used to create a seccomp-bpf filter for a 64-bit
userspace. Unless one explicitly adds the 64-bit ABI to the libseccomp filter,
or adjusts the default behavior for "BAD_ARCH", *all* 64-bit x86 syscalls will
be blocked.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Suggested-by: Paul Moore <paul@paul-moore.com>
src/lxc/seccomp.c