igo95862 / bubblejail

Bubblewrap based sandboxing for desktop applications
261 stars 17 forks source link

Access to cursor themes within Firefox lets Bubblejail mirror home filesystem in instance file #83

Open orchardstreet opened 10 months ago

orchardstreet commented 10 months ago

Output of bubblejail --version

Alpine 0.8.2

Your distro name and version

Alpine 3.19.0

Description

Access to cursor themes seems necessary for basic cursor support in Firefox on Alpine. To access cursor themes I need to check "GNOME Portal" in Bubblejail and have xdg-desktop-portals successfully set up. Did that. Cursor themes work now with Firefox in Bubblejail.

But checking "GNOME PORTAL" now allows me to save outside of "Downloads", despite never telling Bubblejail to. Firefox's Download wizard now shows me every folder in home and saving in a home folder makes bubblejail create a mirror folder in the instance folder.

So for example, by saving test.png in /home/orchardstreet/code/12/13/a, Bubblejail creates the folder(s) .local/share/bubblejail/instances/firefox/home/code/12/13/a and saves it there.

Cursor support I don't think should break the functionality of whitelisting folders. Also curious if this presents a possible security hole as well. Thanks :)

igo95862 commented 10 months ago

Hello @orchardstreet

The issue is that when I added the "GNOME PORTAL" option I didn't do a proper research in to the desktop portals. What it does is allows the sandbox to access entire portal API which includes stuff like File Picker portal.

There should be a more fine tuned control of portal access.

orchardstreet commented 10 months ago

Thanks. Yea I think the only useful thing in the desktop portals would be cursor theme support in Firefox. As without it, there are missing cursors. But yea the File Picker API is of course unnecessary and perhaps a security issue. Thanks for responding.

boredsquirrel commented 5 months ago

Is this an actual problem? Are you using the file chooser portal, or does the program on its own get access?

orchardstreet commented 5 months ago

Is this an actual problem? Are you using the file chooser portal, or does the program on its own get access?

The program

The program on its own gets access to files outside the sandbox under the conditions listed in the OP

It is a problem for the reasons specified in the OP

FeyrisTan commented 1 month ago

Any update on this? Not a huge fan of Adwaita Cursor and I do not want my cursor theme to keep switching depending on the window in focus

igo95862 commented 1 month ago

I want to review the whole portal integration in the next major release.