Harden access to PipeWire via pw_security_context #26

Closed
opened 2025-11-15 12:40:34 +09:00 by ophestra · 2 comments
Owner

Pipewire provides pw_security_context which is similar to wayland security-context-v1 that hakurei already supports. Flatpak currently does not appear to make use of this protocol.

The /.flatpak-info hack described in #21 is vulnerable to a confused deputy attack and race condition which this protocol is secure against. It is, however, not yet known whether the secure screen sharing protocol is usable through this, but a quick read of the source code suggests that is only possible via the /.flatpak-info hack.

Pipewire provides [pw_security_context](https://docs.pipewire.org/group__pw__security__context.html) which is similar to wayland `security-context-v1` that hakurei already supports. Flatpak currently does not appear to make use of this protocol. The `/.flatpak-info` hack described in #21 is vulnerable to a confused deputy attack and race condition which this protocol is secure against. It is, however, not yet known whether the secure screen sharing protocol is usable through this, but a quick read of the source code suggests that is only possible via the `/.flatpak-info` hack.
ophestra added the
Reviewed
Confirmed
Kind
Security
Priority
Critical
labels 2025-11-15 12:40:34 +09:00
ophestra added a new dependency 2025-11-15 12:43:05 +09:00
Author
Owner

Implementation works now, but cannot build static hakurei because pipewire does not support static linking.

Implementation works now, but cannot build static hakurei because pipewire does not support static linking.
ophestra added the
Status
Blocked
label 2025-11-17 22:50:24 +09:00
ophestra added a new dependency 2025-11-18 22:46:07 +09:00
Author
Owner

Implementation of PipeWire client is now complete at 3cb58b4b72. This should be able to move forward soon.

Implementation of PipeWire client is now complete at https://git.gensokyo.uk/security/hakurei/commit/3cb58b4b72ddb9ae1e354b954ae15230c9a49d6d. This should be able to move forward soon.
ophestra removed a dependency 2025-12-06 21:20:57 +09:00
ophestra removed the
Status
Blocked
label 2025-12-06 21:21:13 +09:00
cat referenced this issue from a commit 2025-12-07 22:37:34 +09:00
cat closed this issue 2025-12-09 08:13:38 +09:00
Sign in to join this conversation.