seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
PATCH 1/1 seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
Additional testing reveals that PulseAudio requires shmctl() and the mlock()/munlock() syscalls on some systems/configurations. As before, on systems that do require these syscalls, the problem can be seen with the following command line:
# qemu -monitor stdio -sandbox on \
-device intel-hda -device hda-duplex--- qemu-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
qemu-seccomp.c +4 -1
@@ -225,7 +225,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(fchmod), 240 }, { SCMP_SYS(shmget), 240 }, { SCMP_SYS(shmat), 240 }, - { SCMP_SYS(shmdt), 240 } + { SCMP_SYS(shmdt), 240 }, + { SCMP_SYS(shmctl), 240 }, + { SCMP_SYS(mlock), 240 }, + { SCMP_SYS(munlock), 240 } };int seccomp_start (void )
Quoted 19 lines · Paul Moore
Additional testing reveals that PulseAudio requires
shmctl()and the mlock()/munlock() syscalls on some systems/configurations. As before, on systems that do require these syscalls, the problem can be seen with the following command line:# qemu -monitor stdio -sandbox on \ -device intel-hda -device hda-duplexSigned-off-by Paul Moore <[email protected]>--- qemu-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)qemu-seccomp.c +0
-0@@ -225,7 +225,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(fchmod), 240 },
qemu-seccomp.c static const struct QemuSeccompSyscall · line 234
Quoted 10 lines
qemu-seccomp.c +4
-1{ SCMP_SYS(shmget), 240 }, { SCMP_SYS(shmat), 240 }, - { SCMP_SYS(shmdt), 240 } + { SCMP_SYS(shmdt), 240 }, + { SCMP_SYS(shmctl), 240 }, + { SCMP_SYS(mlock), 240 }, + { SCMP_SYS(munlock), 240 } };int seccomp_start (void )
Bump to bring this back the forefront of everyone's minds. Can we get this merged?
Signature · 2 lines
paul moore security and virtualization @ redhat
Quoted 29 lines · Paul Moore
Quoted 28 lines · Paul Moore
Additional testing reveals that PulseAudio requires
shmctl()and the mlock()/munlock() syscalls on some systems/configurations. As before, on systems that do require these syscalls, the problem can be seen with the following command line:# qemu -monitor stdio -sandbox on \ -device intel-hda -device hda-duplexSigned-off-by Paul Moore <[email protected]>--- qemu-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)qemu-seccomp.c +4
-1@@ -225,7 +225,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(fchmod), 240 }, {SCMP_SYS (shmget),240 }, {SCMP_SYS (shmat),240 }, - {SCMP_SYS (shmdt),240 } + {SCMP_SYS (shmdt),240 }, + {SCMP_SYS (shmctl),240 }, + {SCMP_SYS (mlock),240 }, + {SCMP_SYS (munlock),240 } };
Quoted 5 lines
qemu-seccomp.c static const struct QemuSeccompSyscall seccomp_whitelist[] = { · line 234
Quoted 1 line
qemu-seccomp.c +0
-0int seccomp_start (void )Bump to bring this back the forefront of everyone's minds. Can we get this merged?
Sorry for the late review, I've been hit by a terrible tendinitis and was unable to use a computer for the last week. :(
I ACK this patch and I'll create a pull request by friday EOD if nothing else comes up.
Signature · 2 lines
Eduardo Otubo IBM Linux Technology Center
Quoted 35 lines · Eduardo Otubo
Quoted 34 lines · Paul Moore
Quoted 33 lines · Paul Moore
Additional testing reveals that PulseAudio requires
shmctl()and the mlock()/munlock() syscalls on some systems/configurations. As before, on systems that do require these syscalls, the problem can be seen withthe following command line:
# qemu -monitor stdio -sandbox on \-device intel-hda -device hda-duplex
Signed-off-by Paul Moore <[email protected]>---
qemu-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)qemu-seccomp.c +4
-1@@ -225,7 +225,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(fchmod), 240 }, { SCMP_SYS(shmget), 240 }, { SCMP_SYS(shmat), 240 }, - { SCMP_SYS(shmdt), 240 } + { SCMP_SYS(shmdt), 240 }, + { SCMP_SYS(shmctl), 240 }, + { SCMP_SYS(mlock), 240 }, + { SCMP_SYS(munlock), 240 }};
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
int
seccomp_start(void)Bump to bring this back the forefront of everyone's minds. Can we get this merged?
Sorry for the late review, I've been hit by a terrible tendinitis and was unable to use a computer for the last week. :(
Hopefully nothing that isn't too unbearable and unmanageable. Tendinitis can be a real pain.
Quoted 2 lines
I ACK this patch and I'll create a pull request by friday EOD if nothing else comes up.
Great, thank you. I've run across one more issue related to Open vSwitch and getrusage(); I'll try to get that fixed/tested before Friday, but don't let that hold up this fix.
On a somewhat related note, have you done any work on the dynamic, per-feature whitelist? I'm thinking of doing some work to put together a basic framework for this, but I didn't want to waste time on a duplicated effort ...
-Paul
Signature · 2 lines
paul moore security and virtualization @ redhat