projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c542b30
)
seccomp: block setns, unshare and execveat syscalls
author
Daniel P. Berrangé
<berrange@redhat.com>
Thu, 29 Apr 2021 10:25:13 +0000
(11:25 +0100)
committer
Daniel P. Berrangé
<berrange@redhat.com>
Wed, 16 Feb 2022 18:52:40 +0000
(18:52 +0000)
setns/unshare are used to change namespaces which is not something QEMU
needs to be able todo.
execveat is a new variant of execve so should be blocked just like
execve already is.
Acked-by: Eduardo Otubo <otubo@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
softmmu/qemu-seccomp.c
patch
|
blob
|
history
diff --git
a/softmmu/qemu-seccomp.c
b/softmmu/qemu-seccomp.c
index a7bb5c350fb23a50287d239d4382027001d3cb00..deaf8a4ef5aaa6080eb3235d7cb7ff3ba0daa865 100644
(file)
--- a/
softmmu/qemu-seccomp.c
+++ b/
softmmu/qemu-seccomp.c
@@
-248,6
+248,11
@@
static const struct QemuSeccompSyscall denylist[] = {
{ SCMP_SYS(clone3), QEMU_SECCOMP_SET_SPAWN,
0, NULL, SCMP_ACT_ERRNO(ENOSYS) },
#endif
+#ifdef __SNR_execveat
+ { SCMP_SYS(execveat), QEMU_SECCOMP_SET_SPAWN },
+#endif
+ { SCMP_SYS(setns), QEMU_SECCOMP_SET_SPAWN },
+ { SCMP_SYS(unshare), QEMU_SECCOMP_SET_SPAWN },
/* resource control */
{ SCMP_SYS(setpriority), QEMU_SECCOMP_SET_RESOURCECTL,
0, NULL, SCMP_ACT_ERRNO(EPERM) },