mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3968] chromium: save location bypass and code execution #2480
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2480
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Feb 9, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3968
Bug and expected behavior
When using a Firejailed Chromium (default profile) it's possible to bypass the save location restriction and save files to desktop, or any other location, and to execute whatever file has been downloaded without any prompts.
For it not to be possible to execute the file.
Reproduce
Steps to reproduce the behavior:
Environment
Additional context
If the default system handler for the downloaded file is a snap package, then the file will be executed using the next available, 'non-snap' program instead.
eg: My default video player is VLC (installed from snap) but when I try this with a video file, the video opens with MediaInfo instead.
Also, even though the file isn't saved, if Chromiums save menu is opened again, Chromium file manager shows the file as being on the desktop.
The file can also being executed by entering the file path in the address bar. eg: filename is "pic1.jpg" and default save location is 'Desktop' so entering file:///home/user/Desktop/pic1.jpg in the address bar again executes the file.
I'm not sure if Firejail can prevent this, as the file isn't actually saved, but it doesn't seem right that the file is executed or that an alternate program is found when the default handler is an apparently un-usable snap.
@SkewedZeppelin commented on GitHub (Feb 11, 2021):
This is expected.
Default Chromium and Firefox profiles do not have
private-binset.The file is indeed saved, it is however only in RAM and will be deleted on sandbox exit.
Not sure about the Snap part. Personally I'd remove that 😉 .
@ghost commented on GitHub (Feb 11, 2021):
Please update your firejail package, the 0.9.62 version is vulnerable to this. You can use the PPA maintained by one of our collaborators if the official repo's you use are not (yet) updated. The current chromium profiles block access to ${DESKTOP}, contrary to those in 0.9.62.
Opening stuff with the system default launchers is considered a feature. If those launchers are themselves sandboxed by firejail they'll inherit the chromium sandbox options and might or might not work as expected. If you prefer to disable that feature you could
blacklist /usr/bin/xdg-open.+1 for NOT using snap (and flatpak for that matter). As our man page states they use their own sandboxing technology and are not supported.
@ghost commented on GitHub (Feb 12, 2021):
I'm not a fan of snap myself, I'm doing a reinstall soon and wont be using it again. Ok np, I'll close this then.