mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5872] firefox: dmesg: apparmor="DENIED" name="/opt/Firefox/update.test" #3115
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#3115
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 @Gerenuk on GitHub (Jun 28, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5872
Firefox with firejail seems to function normally, but I see error messages in
dmesg:This appears 3 times and does not repeat more when I restart firefox (with or without profile). I guess it's some type of update test that Firefox performs.
/opt/Firefoxis my firefox directory andupdate.testdoes usually not exist.I do not know if this impacts functionality of the update check. It's a minor issue, but I thought there shouldn't be stray error messages in dmesg and hopefully this is a small fix.
(firejail 0.9.72)
@ghost commented on GitHub (Jun 29, 2023):
How do you usually install your Firefox? And what OS is this?
Indeed, very likely this is Firefox'
updatertrying to write into /optFirefox/update.test. Usually, when installing Firefox via native OS package manager, its app-internal updating fuctionality is disabled. Hence our default AppArmor profile only supports executing files under /opt:fbd53a8f8c/etc/apparmor/firejail-default (L98)Even if you wanted to, your user doesn't have the needed privileges to install pending updates to /opt/Firefox. Or at least they shouldn't have. So instead of messing with AppArmor options, to me it would make more sense to never allow such update checks in the first place (when running from under /opt). Could be as simple as setting
app.update.autotofalsein about:config.If you disable FF auto-update, do you still get those messages?
If for some reason you don't want to disable that, does
appendinga line like the one below to your /etc/apparmor.d/local/firejail-default stops those messages from showing up in dmesg? PLEASE NOTE that after making changes to anything under /etc/apparmor.d it's best to do a full reboot and let AppArmor refresh its cache. Not doing so could give incorrect results.If that's too restrictive, try
Depending on the results of your testing we can make a more informed decision on adding to/fixing our default AppArmor files later on. Thanks for reporting!
@Gerenuk commented on GitHub (Jul 13, 2023):
Usually I have a script which downloads the new binary from Mozilla and puts it into /opt/Firefox. I'm using Manjaro Linux, but not their Firefox package.
Using the first line
/opt/Firefox/update.test rw,would givedmesgmessageand an error in Firefox when it tries to update.
Using the second line
/opt/Firefox/** rw,makes Firefox update successfully, but weirdly I still get another dmesg error messageOf course I would prefer to add such custom modification to
~/.config/firejail/...somehow instead of/etc.I'm actually not sure if I want Firefox to automatically update itself, but I definitely want Firefox to tell me about new updates. And while that worked before, ideally I also do not see error messages in
dmesg.@ghost commented on GitHub (Jul 13, 2023):
The error message shows that your Firefox tries to create
/opt/update.test/, which isn't covered by the new/opt/Firefox/** rw,rule. So you'll have to allow that too:That's not possible. Apparmor only accepts such overrides from
/etc/apparmor.d/local/firefox-default, which expands/etc/apparmor.d/firejail-defaultautomatically. If you install Firejail via pacman from Manjaro's repositories these customizations will survive future Firejail upgrades via the backup configuration.Please test these rules again and report back. You can use Firefox' internal configuration to only have it show you available updates without automatically installing those. If you could implement this 'new Firefox upgrade available' logic into your shell script it would simplify things.
@Gerenuk commented on GitHub (Jul 14, 2023):
With these 3 lines there are no more dmesg audit messages anymore. Thanks! I know how to reconfigure things now.
I'll will probably set Firefox to check for updates, but not perform them. And I'll play with these 3 lines to remove all dmesg audit messages.
I think it would be better to not allow the whole Firefox directory, as it's the whole point of security to restrict access.