[meta] Sandboxing improvements when audio playback & recording are remoted
Categories
(Core :: Security: Process Sandboxing, enhancement, P3)
Tracking
()
People
(Reporter: gcp, Unassigned)
References
(Depends on 1 open bug)
Details
(Keywords: meta)
Reporter | ||
Updated•11 years ago
|
Reporter | ||
Updated•11 years ago
|
Reporter | ||
Comment 1•11 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Comment 2•10 years ago
|
||
![]() |
||
Updated•10 years ago
|
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Updated•9 years ago
|
![]() |
||
Updated•9 years ago
|
Updated•9 years ago
|
![]() |
||
Updated•9 years ago
|
![]() |
||
Updated•8 years ago
|
![]() |
||
Updated•8 years ago
|
![]() |
||
Updated•8 years ago
|
![]() |
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 8•8 years ago
|
||
Updated•7 years ago
|
Updated•3 years ago
|
Comment 9•10 months ago
|
||
Audio access is remoted on Linux and has been for years now. The media.cubeb.sandbox
pref still exists, and I think the media people might want to keep it around for troubleshooting or debugging, but we don't need to support flipping that pref without also explicitly turning off content sandboxing. I'm told that that's already the case on Windows. It also parallels what we did with WebGL remoting — if it's turned off then it's also necessary to explicitly turn off security.sandbox.content.headless
(which is dangerous, especially on X11).
This has already sort of started happening to some extent; see bug 1604269 which didn't gate the change on sandbox level, and in general we don't test the semi-sandboxed configuration that currently results from flipping media.cubeb.sandbox
(it's insecure and unsupported), so there could be other cases of accidental breakage as well.
There are three places the sandbox is weakened in response to that pref, which we could remove:
- Clamping the effective sandbox level to 3
- Sharing the SysV IPC namespace (if the ALSA backend is compiled in)
- Preloading the audio backend, meaning that the process holds a connection to the audio server which could be a sandbox escape vector
The last one is more complicated, because — tested on Debian using Pipewire — audio is broken without that workaround (the first objectionable syscall is umask
) even if the sandbox isn't otherwise changed from the status quo. Removing that would mean that sandboxing would have to be turned off completely for non-remote audio, rather than just using an untested weak policy (level 3). Which brings me to the next set of things that we probably want to rip out:
- Basically everything in
SandboxFilter.cpp
that's ifdef'ed onMOZ_PULSEAUDIO
orMOZ_ALSA
. - And anything with comments mentioning non-remote audio, if not already covered by the above.
When we do that, we'll want to make sure that crash reports record whether media.cubeb.sandbox
was flipped, in case there's anyone using Nightly with weird pref settings.
Updated•3 months ago
|
Description
•