-
v0.3.3
StableAll checks were successfulRelease / Create release (push) Successful in 42sTest / Sandbox (push) Successful in 43sTest / Hakurei (push) Successful in 3m2sTest / Create distribution (push) Successful in 27sTest / Hpkg (push) Successful in 3m57sTest / Sandbox (race detector) (push) Successful in 4m41sTest / Hakurei (race detector) (push) Successful in 5m0sTest / Flake checks (push) Successful in 1m43sreleased this
2025-12-15 20:34:45 +09:00 | 528 commits to master since this releaseSecurity
This release mitigates vulnerabilities in PipeWire
SecurityContext. It is highly recommended to upgrade to this release as soon as possible.The
SecurityContextmachinery is fatally flawed, it blindly sets read and execute bits on all objects for clients with the lowest achievable privilege level (by settingPW_KEY_ACCESSto"restricted"). This enables them to call any method targeting any object, and sinceRegistry::Destroychecks for the read and execute bit, allows the destruction of any object other thanPW_ID_COREas well. This behaviour is implemented separately inmedia-sessionandwireplumber, with thewireplumberimplementation in Lua via an embedded Lua vm. In all known setups,wireplumberis in use, and there is no known way to change its behaviour and set permissions differently without replacing the Lua script. Also, since PipeWire relies on these permissions to work, reducing them is not possible.Currently, the only other sandboxed use case is flatpak, which is not aware of PipeWire and blindly exposes the bare PulseAudio socket to the container (behaves like
DirectPulse). This socket is backed by thepipewire-pulsecompatibility daemon, which obtains client pid via theSO_PEERCREDoption. The PipeWire daemon,pipewire-pulsedaemon and the session manager daemon then separately performs the/.flatpak-infohack described in #21. Under such use case, since the client has no direct access to PipeWire, insecure parts of the protocol are obscured bypipewire-pulsesimply not implementing them, and thus hiding the flaws described above.Hakurei does not rely on the
/.flatpak-infohack. Instead, a socket is sets up viaSecurityContext. Apipewire-pulseserver connected through it achieves the same permissions as flatpak does via the/.flatpak-infohack and is maintained for the life of the container.As of this release, upstream has not responded to the ticket regarding these flaws, and it is highly unlikely that a fix is possible without breaking the entire protocol.
Fixes
- Implement all reachable events in
internal/pipewire. - Treat unknown opcodes as fatal in
internal/pipewire. - Treat invalid proxy acknowledgement as fatal in
internal/pipewire. - Correctly handle
nilvalues in POD format ininternal/pipewire.
Enhancements
- Package
internal/pipewirenow handles directedCore::Errorevents as part of the exported methods. - The error string for an unsupported type error is used as the error message directly, which cleans up the resulting output.
Internal
- Distribution tarballs are now built using newer versions of compiler and libraries.
- Implement local and remote object destruction in
internal/pipewire. - Move
Coremethods under theCoretype ininternal/pipewire. - Synchronise stubbed wait4 loop after call to notify in
container. - Shim now supports an optional private working directory.
Full Changelog: v0.3.2...v0.3.3
Downloads
- Implement all reachable events in