Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PipeWire sound server permission marks application as potentially unsafe #1919

Open
ilya-fedin opened this issue Sep 8, 2023 · 23 comments
Open

Comments

@ilya-fedin
Copy link

ilya-fedin commented Sep 8, 2023

According to flatpak/flatpak#5130 (comment), --filesystem=xdg-run/pipewire-0 is the right permission for PipeWire acting as sound server yet flathub website marks applications as potentially unsafe with the following:

PulseAudio permission doesn't cause such a problem.

@orowith2os
Copy link

orowith2os commented Sep 8, 2023

PipeWire isn't just a sound server - it handles screen sharing, cameras, and all sorts of multimedia devices too. It should 100% be marked as potentially unsafe. How it's marked as potentially unsafe is the topic for discussion here.

@ilya-fedin
Copy link
Author

Do you mean flatpak applications should avoid pipewire and use pulseaudio to be safe? I want to get rid of this for my application, not a clearer statement. I don't think my application should be marked as such just because it uses the more modern API.

@orowith2os
Copy link

I don't mean anything - it's up to the apps to choose what they want to use here. But safety warnings don't really matter right now, until quite a few portals land (an expanded Device portal, for one).

@ilya-fedin
Copy link
Author

an expanded Device portal, for one

It seem to stuck for two years already?

@ilya-fedin
Copy link
Author

I'd wonder what's the recommended approach to avoid application being marked as potentially unsafe for now 🤔

@orowith2os
Copy link

It seem to stuck for two years already?

Contributions welcome.

@razzeee
Copy link
Contributor

razzeee commented Sep 8, 2023

@ilya-fedin can you try if this also happens in gnome software (ideally gnome software 45)

if it does happen there:

if it doesn't, I probably missed it when I implemended this.

@razzeee
Copy link
Contributor

razzeee commented Sep 8, 2023

It would also be great to let us know which apps you were able to test this with, I'm not feeling like I should have to hunt this down :)

@ilya-fedin
Copy link
Author

ilya-fedin commented Sep 8, 2023

@razzeee I don't think I can, I'm a NixOS KDE user, installing GNOME software will likely be a big headache (will require activating addition services in the system config but I don't want to rebuild my system now)...

@razzeee
Copy link
Contributor

razzeee commented Sep 8, 2023

@ilya-fedin I can probably check it for you, I have a vm and a laptop already on 45, but I will need an app with that permission set

@ilya-fedin
Copy link
Author

ilya-fedin commented Sep 8, 2023

https://github.com/search?q=org%3Aflathub%20--filesystem%3Dxdg-run%2Fpipewire-0&type=code
Personally I was checking org.telegram.desktop

@razzeee
Copy link
Contributor

razzeee commented Sep 8, 2023

Yeah, this seems to be an oversight in g-s too, I think. I'll open an issue over there.

@razzeee
Copy link
Contributor

razzeee commented Sep 8, 2023

@razzeee
Copy link
Contributor

razzeee commented Nov 29, 2023

https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1811/diffs is the current state of gnome software

@ilya-fedin
Copy link
Author

ilya-fedin commented Nov 29, 2023

Do I understand right that pulseaudio access will still be displayed as safer than pipewire access?

@razzeee
Copy link
Contributor

razzeee commented Nov 29, 2023

I don't think so, but can you point me to an example/finish-arg?

@ilya-fedin
Copy link
Author

finish arg of what? pulseaudio access? --socket=pulseaudio. Almost every flatpak package has it yet flathub doesn't present it in any way nor marks application as potentially unsafe due to it, unlike pipewire.

@razzeee
Copy link
Contributor

razzeee commented Nov 29, 2023

As far as I know, that only allows audio playback (at least if https://docs.flatpak.org/en/latest/sandbox-permissions.html#standard-permissions is right) which should be safe.

The pipewire file, allows you to play sound, record sound, access the camera, the screen contents etc.

@ilya-fedin
Copy link
Author

ilya-fedin commented Nov 29, 2023

It also allows to record the sound. Or apps like Discord wouldn't work. It's an unsandboxed access to the pulseaudio socket, just determining the socket path on your behalf.

@razzeee
Copy link
Contributor

razzeee commented Nov 30, 2023

Right, can you report this to gnome software and link us here to that issue?

@ilya-fedin
Copy link
Author

I'm not sure I can given that I don't use gnome software? I wouldn't be able to answer gnome software-specific questions.

@razzeee
Copy link
Contributor

razzeee commented Nov 30, 2023

@ilya-fedin
Copy link
Author

Lurking regarding the --filesystem=xdg-run/pipewire-0 change in gnome-software I noticed https://gitlab.gnome.org/GNOME/gnome-software/-/commit/56c3a9b784da23f2a60f18b807bd31f3701dee78, is flathub going to do the same? It looks quite weird given that --devices=all provides access to all the /dev including /dev/dri and /dev/fb* that should give the screen grabbing (and likely also modifying) just as well as pipewire. I would expect that to be mentioned in the existing all-device access rather than a separate item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants