mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4146] firefox profile cannot run Emacs because /usr/share/emacs is not whitelisted #2549
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#2549
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 @vinc17fr on GitHub (Mar 28, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4146
When using the
firefoxprofile, Emacs cannot be run because the/usr/share/emacsdirectory is not whitelisted. Being able to run Emacs from Firefox is useful to open text files served asContent-Disposition: attachment.Test to reproduce:
Adding
to
~/.config/firejail/firefox-common.localsolves the issue, but this should be in the default configuration.Environment: Debian/unstable with the
firejail 0.9.64.4-2Debian package.@chiraag-nataraj commented on GitHub (May 5, 2021):
I don't think this makes sense by default, it's why the
.localfile mechanism exists. I'm going to close this for now, but feel free to reopen if you can make a good case for why this should be the default 😊@vinc17fr commented on GitHub (May 5, 2021):
Firefox does not open text files served as
Content-Disposition: attachmentor text files with an unknown MIME content-type (Firefox bug 57342). In these cases, an external application is needed, and one of the proposed choices in the "Choose Helper Application" dialog is Emacs (when installed). Even though this can be done with a.localfile, the default should just work. The/usr/share/emacsdirectory contains only files from the vendor, so that there should be no security issues to make it readable.But perhaps this directory should be added to
whitelist-usr-share-common.inc, which already contains whiltelists for other software, so why not Emacs?@kris7t commented on GitHub (May 5, 2021):
A better solution would be to explicitly make Firefox display no applications to chose from in the "Choose Helper Application" dialog by default, only letting you to download into a shared directory (
$HOME/Downloadsmost likely) with appropriate permissions, then opening with your editor inside another sandbox (separate from the Firefox one).Running multiple applications in the same sandbox just increases the attack surface: although likely inconsequential for plain text files, with more complicated attachments (say, pdfs) an attacker could now leverage all the vulnerabilities in the pdf reader to exfiltrate sensitive data (like session cookies) from the browser, even if they couldn't find a suitable vulnerability in the browser itself.
Although browser extensions could introduce their own vulnerabilities, solely to open files, a fairly tiny extension like Open in Browser, that lets you select the mime type to open a file as, may be more suitable than running a whole huge Emacs instance inside the browser firejail sandbox.
For my taste,
whitelist-usr-share-common.incis a bit bloated, but most of the stuff in there is quite hard to disentangle from modern applications, unfortunately.@vinc17fr commented on GitHub (May 6, 2021):
This would be annoying for the user, for probably not many advantages. Or perhaps there could be 2 kinds of profiles.