New syscalls to the seccomp whitelist
PATCH 1/1 New syscalls to the seccomp whitelist
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug -
https://bugzilla.redhat.com/show_bug.cgi?id=855162
Regards,
--- qemu-seccomp.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
qemu-seccomp.c +20 -1
@@ -70,6 +70,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(setsockopt), 245}, { SCMP_SYS(uname), 245}, { SCMP_SYS(semget), 245}, + { SCMP_SYS(accept4), 241 }, #endif { SCMP_SYS(eventfd2), 245 }, { SCMP_SYS(dup), 245 },
@@ -107,7 +108,25 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(getsockname), 242 }, { SCMP_SYS(getpeername), 242 }, { SCMP_SYS(fdatasync), 242 }, - { SCMP_SYS(close), 242 } + { SCMP_SYS(close), 242 }, + { SCMP_SYS(unlink), 241 }, + { SCMP_SYS(statfs), 241 }, + { SCMP_SYS(getuid), 241 }, + { SCMP_SYS(ftruncate), 241 }, + { SCMP_SYS(getegid), 241 }, + { SCMP_SYS(geteuid), 241 }, + { SCMP_SYS(getgid), 241 }, + { SCMP_SYS(getrlimit), 241 }, + { SCMP_SYS(set_tid_address), 241 }, + { SCMP_SYS(socketpair), 241 }, + { SCMP_SYS(fstatfs), 241 }, + { SCMP_SYS(epoll_create), 241 }, + { SCMP_SYS(epoll_ctl), 241 }, + { SCMP_SYS(epoll_wait), 241 }, + { SCMP_SYS(pipe), 241 }, + { SCMP_SYS(poll), 241 }, + { SCMP_SYS(rt_sigpending), 241 }, + { SCMP_SYS(rt_sigtimedwait), 241 }, };int seccomp_start (void )
Signature · 1 line
1.7.12
Am 20.09.2012 23:00, schrieb Eduardo Otubo:
Quoted 8 lines
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug -
https://bugzilla.redhat.com/show_bug.cgi?id=855162Regards,
--- qemu-seccomp.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
SoB is missing.
Kevin
PATCH 1/1 New syscalls to the seccomp whitelist
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug -
https://bugzilla.redhat.com/show_bug.cgi?id=855162
--- qemu-seccomp.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
qemu-seccomp.c +20 -1
@@ -70,6 +70,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(setsockopt), 245}, { SCMP_SYS(uname), 245}, { SCMP_SYS(semget), 245}, + { SCMP_SYS(accept4), 241 }, #endif { SCMP_SYS(eventfd2), 245 }, { SCMP_SYS(dup), 245 },
@@ -107,7 +108,25 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(getsockname), 242 }, { SCMP_SYS(getpeername), 242 }, { SCMP_SYS(fdatasync), 242 }, - { SCMP_SYS(close), 242 } + { SCMP_SYS(close), 242 }, + { SCMP_SYS(unlink), 241 }, + { SCMP_SYS(statfs), 241 }, + { SCMP_SYS(getuid), 241 }, + { SCMP_SYS(ftruncate), 241 }, + { SCMP_SYS(getegid), 241 }, + { SCMP_SYS(geteuid), 241 }, + { SCMP_SYS(getgid), 241 }, + { SCMP_SYS(getrlimit), 241 }, + { SCMP_SYS(set_tid_address), 241 }, + { SCMP_SYS(socketpair), 241 }, + { SCMP_SYS(fstatfs), 241 }, + { SCMP_SYS(epoll_create), 241 }, + { SCMP_SYS(epoll_ctl), 241 }, + { SCMP_SYS(epoll_wait), 241 }, + { SCMP_SYS(pipe), 241 }, + { SCMP_SYS(poll), 241 }, + { SCMP_SYS(rt_sigpending), 241 }, + { SCMP_SYS(rt_sigtimedwait), 241 }, };int seccomp_start (void )
Signature · 1 line
1.7.12
Anyone interested in taking a look at this piece of code? Thanks!
Quoted 51 lines · Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug -
https://bugzilla.redhat.com/show_bug.cgi?id=855162Signed-off-by Eduardo Otubo <[email protected]>--- qemu-seccomp.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)qemu-seccomp.c +20
-1@@ -70,6 +70,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(setsockopt), 245}, { SCMP_SYS(uname), 245}, { SCMP_SYS(semget), 245}, + { SCMP_SYS(accept4), 241 }, #endif { SCMP_SYS(eventfd2), 245 }, { SCMP_SYS(dup), 245 },@@ -107,7 +108,25 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(getsockname), 242 }, { SCMP_SYS(getpeername), 242 }, { SCMP_SYS(fdatasync), 242 }, - { SCMP_SYS(close), 242 } + { SCMP_SYS(close), 242 }, + { SCMP_SYS(unlink), 241 }, + { SCMP_SYS(statfs), 241 }, + { SCMP_SYS(getuid), 241 }, + { SCMP_SYS(ftruncate), 241 }, + { SCMP_SYS(getegid), 241 }, + { SCMP_SYS(geteuid), 241 }, + { SCMP_SYS(getgid), 241 }, + { SCMP_SYS(getrlimit), 241 }, + { SCMP_SYS(set_tid_address), 241 }, + { SCMP_SYS(socketpair), 241 }, + { SCMP_SYS(fstatfs), 241 }, + { SCMP_SYS(epoll_create), 241 }, + { SCMP_SYS(epoll_ctl), 241 }, + { SCMP_SYS(epoll_wait), 241 }, + { SCMP_SYS(pipe), 241 }, + { SCMP_SYS(poll), 241 }, + { SCMP_SYS(rt_sigpending), 241 }, + { SCMP_SYS(rt_sigtimedwait), 241 }, };int seccomp_start (void )Signature · 1 line
1.7.12
Signature · 4 lines
Eduardo Otubo Software Engineer Linux Technology Center IBM Systems & Technology Group
Quoted 2 lines · Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt ...
Hi Eduardo,
I know from our discussions offlist that you have an additional debugging patch to help identify missing syscalls, perhaps you could also submit that patch too? I think we would want the debugging patch #ifdef'd out in normal use, but I think it might help the QEMU developers.
Signature · 2 lines
paul moore security and virtualization @ redhat
Quoted 10 lines · Paul Moore
Quoted 2 lines · Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt ...
Hi Eduardo,
I know from our discussions offlist that you have an additional debugging patch to help identify missing syscalls, perhaps you could also submit that patch too? I think we would want the debugging patch #ifdef'd out in normal use, but I think it might help the QEMU developers.
That's surely a good thing Paul. I'll rebase my patches and send it right away. Thanks!
Signature · 4 lines
Eduardo Otubo Software Engineer Linux Technology Center IBM Systems & Technology Group
Quoted 7 lines · Eduardo Otubo
Quoted 6 lines · Paul Moore
Quoted 2 lines · Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt ...
Hi Eduardo,
Quoted 7 lines
Quoted 4 lines
I know from our discussions offlist that you have an additional debugging patch to help identify missing syscalls, perhaps you could also submit that patch too? I think we would want the debugging patch #ifdef'd out in normal use, but I think it might help the QEMU developers.
That's surely a good thing Paul. I'll rebase my patches and send it right away. Thanks!
Great, I think that will be a nice addition.
Also, FWIW, I don't think you need to rebase/resubmit the patch you already sent, just port your debugging patch to go on top.
Signature · 2 lines
paul moore security and virtualization @ redhat
Quoted 39 lines · Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug -
https://bugzilla.redhat.com/show_bug.cgi?id=855162Signed-off-by Eduardo Otubo <[email protected]>--- qemu-seccomp.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)qemu-seccomp.c +13
-1@@ -70,6 +70,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(setsockopt), 245}, { SCMP_SYS(uname), 245}, { SCMP_SYS(semget), 245}, + { SCMP_SYS(accept4), 241 }, #endif { SCMP_SYS(eventfd2), 245 }, { SCMP_SYS(dup), 245 },@@ -107,7 +108,25 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(getsockname), 242 }, { SCMP_SYS(getpeername), 242 }, { SCMP_SYS(fdatasync), 242 }, - { SCMP_SYS(close), 242 } + { SCMP_SYS(close), 242 }, + { SCMP_SYS(unlink), 241 }, + { SCMP_SYS(statfs), 241 }, + { SCMP_SYS(getuid), 241 }, + { SCMP_SYS(ftruncate), 241 }, + { SCMP_SYS(getegid), 241 }, + { SCMP_SYS(geteuid), 241 }, + { SCMP_SYS(getgid), 241 }, + { SCMP_SYS(getrlimit), 241 }, + { SCMP_SYS(set_tid_address), 241 }, + { SCMP_SYS(socketpair), 241 }, + { SCMP_SYS(fstatfs), 241 },
qemu-seccomp.c static const struct QemuSeccompSyscall seccomp_whitelist[] = { · line 132
Quoted 10 lines
qemu-seccomp.c +7
-0+ { SCMP_SYS(epoll_create), 241 }, + { SCMP_SYS(epoll_ctl), 241 }, + { SCMP_SYS(epoll_wait), 241 }, + { SCMP_SYS(pipe), 241 }, + { SCMP_SYS(poll), 241 }, + { SCMP_SYS(rt_sigpending), 241 }, + { SCMP_SYS(rt_sigtimedwait), 241 }, };int seccomp_start (void )
If this is required for libvirt + seccomp, might be a candidate for 1.2 stable, cc'ing. At the very least we will be carrying this in Fedora 18.
- Cole
Quoted 3 lines · Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug -
https://bugzilla.redhat.com/show_bug.cgi?id=855162
Unfortunately, this patch still does not work correctly for me using F17/libvirt and a F16 guest. The QEMU instance starts, and the guest appears to be running, but I never see any of the BIOS POST messages on the console.
I'm attaching the guest's XML definition file if that helps.
Quoted 44 lines
Signed-off-by Eduardo Otubo <[email protected]>--- qemu-seccomp.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)qemu-seccomp.c +20
-1@@ -70,6 +70,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(setsockopt), 245}, { SCMP_SYS(uname), 245}, { SCMP_SYS(semget), 245}, + { SCMP_SYS(accept4), 241 }, #endif { SCMP_SYS(eventfd2), 245 }, { SCMP_SYS(dup), 245 },@@ -107,7 +108,25 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(getsockname), 242 }, {SCMP_SYS (getpeername),242 }, {SCMP_SYS (fdatasync),242 }, - {SCMP_SYS (close),242 } + {SCMP_SYS (close),242 }, + {SCMP_SYS (unlink),241 }, + {SCMP_SYS (statfs),241 }, + {SCMP_SYS (getuid),241 }, + {SCMP_SYS (ftruncate),241 }, + {SCMP_SYS (getegid),241 }, + {SCMP_SYS (geteuid),241 }, + {SCMP_SYS (getgid),241 }, + {SCMP_SYS (getrlimit),241 }, + {SCMP_SYS (set_tid_address),241 }, + {SCMP_SYS (socketpair),241 }, + {SCMP_SYS (fstatfs),241 }, + {SCMP_SYS (epoll_create),241 }, + {SCMP_SYS (epoll_ctl),241 }, + {SCMP_SYS (epoll_wait),241 }, + {SCMP_SYS (pipe),241 }, + {SCMP_SYS (poll),241 }, + {SCMP_SYS (rt_sigpending),241 }, + {SCMP_SYS (rt_sigtimedwait),241 }, };int seccomp_start (void )
Signature · 2 lines
paul moore security and virtualization @ redhat