* [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio
@ 2014-01-15 19:38 Paul Moore
2014-01-15 19:38 ` [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist Paul Moore
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Paul Moore @ 2014-01-15 19:38 UTC (permalink / raw)
To: Corey Bryant, qemu-devel, Eduardo Otubo
It turns out we need to add some additional syscalls to QEMU to make
PulseAudio happy. Two minor patches follow ...
---
Paul Moore (2):
seccomp: add mkdir() and fchmod() to the whitelist
seccomp: add some basic shared memory syscalls to the whitelist
qemu-seccomp.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist
2014-01-15 19:38 [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Paul Moore
@ 2014-01-15 19:38 ` Paul Moore
2014-01-16 15:53 ` Eduardo Otubo
2014-01-15 19:38 ` [Qemu-devel] [PATCH 2/2] seccomp: add some basic shared memory syscalls " Paul Moore
2014-01-16 15:52 ` [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Eduardo Otubo
2 siblings, 1 reply; 7+ messages in thread
From: Paul Moore @ 2014-01-15 19:38 UTC (permalink / raw)
To: Corey Bryant, qemu-devel, Eduardo Otubo
The PulseAudio library attempts to do a mkdir(2) and fchmod(2) on
"/run/user/<UID>/pulse" which is currently blocked by the syscall
filter; this patch adds the two missing syscalls to the whitelist.
You can reproduce this problem with the following command:
# qemu -monitor stdio -device intel-hda -device hda-duplex
If watched under strace the following syscalls are shown:
mkdir("/run/user/0/pulse", 0700)
fchmod(11, 0700) [NOTE: 11 is the fd for /run/user/0/pulse]
Reported-by: xuhan@redhat.com
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
qemu-seccomp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index b7c1253..89f244f 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -220,7 +220,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(io_cancel), 241 },
{ SCMP_SYS(io_setup), 241 },
{ SCMP_SYS(io_destroy), 241 },
- { SCMP_SYS(arch_prctl), 240 }
+ { SCMP_SYS(arch_prctl), 240 },
+ { SCMP_SYS(mkdir), 240 },
+ { SCMP_SYS(fchmod), 240 }
};
int seccomp_start(void)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 2/2] seccomp: add some basic shared memory syscalls to the whitelist
2014-01-15 19:38 [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Paul Moore
2014-01-15 19:38 ` [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist Paul Moore
@ 2014-01-15 19:38 ` Paul Moore
2014-01-16 15:53 ` Eduardo Otubo
2014-01-16 15:52 ` [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Eduardo Otubo
2 siblings, 1 reply; 7+ messages in thread
From: Paul Moore @ 2014-01-15 19:38 UTC (permalink / raw)
To: Corey Bryant, qemu-devel, Eduardo Otubo
PulseAudio requires the use of shared memory so add shmget(), shmat(),
and shmdt() to the syscall whitelist.
Reported-by: xuhan@redhat.com
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
qemu-seccomp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 89f244f..caa926e 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -222,7 +222,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(io_destroy), 241 },
{ SCMP_SYS(arch_prctl), 240 },
{ SCMP_SYS(mkdir), 240 },
- { SCMP_SYS(fchmod), 240 }
+ { SCMP_SYS(fchmod), 240 },
+ { SCMP_SYS(shmget), 240 },
+ { SCMP_SYS(shmat), 240 },
+ { SCMP_SYS(shmdt), 240 }
};
int seccomp_start(void)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio
2014-01-15 19:38 [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Paul Moore
2014-01-15 19:38 ` [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist Paul Moore
2014-01-15 19:38 ` [Qemu-devel] [PATCH 2/2] seccomp: add some basic shared memory syscalls " Paul Moore
@ 2014-01-16 15:52 ` Eduardo Otubo
2014-01-16 15:57 ` Paul Moore
2 siblings, 1 reply; 7+ messages in thread
From: Eduardo Otubo @ 2014-01-16 15:52 UTC (permalink / raw)
To: Paul Moore; +Cc: Corey Bryant, qemu-devel
On 01/15/2014 05:38 PM, Paul Moore wrote:
> It turns out we need to add some additional syscalls to QEMU to make
> PulseAudio happy. Two minor patches follow ...
>
> ---
>
> Paul Moore (2):
> seccomp: add mkdir() and fchmod() to the whitelist
> seccomp: add some basic shared memory syscalls to the whitelist
>
>
> qemu-seccomp.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>
Paul, sorry for the so late review. I was on vacation until yesterday
and I'm still trying to empty my inbox.
--
Eduardo Otubo
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist
2014-01-15 19:38 ` [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist Paul Moore
@ 2014-01-16 15:53 ` Eduardo Otubo
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Otubo @ 2014-01-16 15:53 UTC (permalink / raw)
To: Paul Moore; +Cc: Corey Bryant, qemu-devel
I have tested and reviewed both patches. And if nothing more comes up,
I'll send a pull request by tomorrow EOD.
On 01/15/2014 05:38 PM, Paul Moore wrote:
> The PulseAudio library attempts to do a mkdir(2) and fchmod(2) on
> "/run/user/<UID>/pulse" which is currently blocked by the syscall
> filter; this patch adds the two missing syscalls to the whitelist.
> You can reproduce this problem with the following command:
>
> # qemu -monitor stdio -device intel-hda -device hda-duplex
>
> If watched under strace the following syscalls are shown:
>
> mkdir("/run/user/0/pulse", 0700)
> fchmod(11, 0700) [NOTE: 11 is the fd for /run/user/0/pulse]
>
> Reported-by: xuhan@redhat.com
> Signed-off-by: Paul Moore <pmoore@redhat.com>
> ---
> qemu-seccomp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-seccomp.c b/qemu-seccomp.c
> index b7c1253..89f244f 100644
> --- a/qemu-seccomp.c
> +++ b/qemu-seccomp.c
> @@ -220,7 +220,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
> { SCMP_SYS(io_cancel), 241 },
> { SCMP_SYS(io_setup), 241 },
> { SCMP_SYS(io_destroy), 241 },
> - { SCMP_SYS(arch_prctl), 240 }
> + { SCMP_SYS(arch_prctl), 240 },
> + { SCMP_SYS(mkdir), 240 },
> + { SCMP_SYS(fchmod), 240 }
ACK.
--
Eduardo Otubo
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] seccomp: add some basic shared memory syscalls to the whitelist
2014-01-15 19:38 ` [Qemu-devel] [PATCH 2/2] seccomp: add some basic shared memory syscalls " Paul Moore
@ 2014-01-16 15:53 ` Eduardo Otubo
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Otubo @ 2014-01-16 15:53 UTC (permalink / raw)
To: Paul Moore; +Cc: Corey Bryant, qemu-devel
On 01/15/2014 05:38 PM, Paul Moore wrote:
> PulseAudio requires the use of shared memory so add shmget(), shmat(),
> and shmdt() to the syscall whitelist.
>
> Reported-by: xuhan@redhat.com
> Signed-off-by: Paul Moore <pmoore@redhat.com>
> ---
> qemu-seccomp.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-seccomp.c b/qemu-seccomp.c
> index 89f244f..caa926e 100644
> --- a/qemu-seccomp.c
> +++ b/qemu-seccomp.c
> @@ -222,7 +222,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
> { SCMP_SYS(io_destroy), 241 },
> { SCMP_SYS(arch_prctl), 240 },
> { SCMP_SYS(mkdir), 240 },
> - { SCMP_SYS(fchmod), 240 }
> + { SCMP_SYS(fchmod), 240 },
> + { SCMP_SYS(shmget), 240 },
> + { SCMP_SYS(shmat), 240 },
> + { SCMP_SYS(shmdt), 240 }
ACK.
--
Eduardo Otubo
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio
2014-01-16 15:52 ` [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Eduardo Otubo
@ 2014-01-16 15:57 ` Paul Moore
0 siblings, 0 replies; 7+ messages in thread
From: Paul Moore @ 2014-01-16 15:57 UTC (permalink / raw)
To: Eduardo Otubo; +Cc: Corey Bryant, qemu-devel
On Thursday, January 16, 2014 01:52:30 PM Eduardo Otubo wrote:
> On 01/15/2014 05:38 PM, Paul Moore wrote:
> > It turns out we need to add some additional syscalls to QEMU to make
> > PulseAudio happy. Two minor patches follow ...
> >
> > ---
> >
> > Paul Moore (2):
> > seccomp: add mkdir() and fchmod() to the whitelist
> > seccomp: add some basic shared memory syscalls to the whitelist
> >
> > qemu-seccomp.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
>
> Paul, sorry for the so late review. I was on vacation until yesterday
> and I'm still trying to empty my inbox.
No worries. Personally, I wouldn't call a one day turnaround as a late
review, I'd call that pretty good :)
--
paul moore
security and virtualization @ redhat
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-16 15:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15 19:38 [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Paul Moore
2014-01-15 19:38 ` [Qemu-devel] [PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist Paul Moore
2014-01-16 15:53 ` Eduardo Otubo
2014-01-15 19:38 ` [Qemu-devel] [PATCH 2/2] seccomp: add some basic shared memory syscalls " Paul Moore
2014-01-16 15:53 ` Eduardo Otubo
2014-01-16 15:52 ` [Qemu-devel] [PATCH 0/2] QEMU/seccomp fixes for PulseAudio Eduardo Otubo
2014-01-16 15:57 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).