mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6389] Cannot mount usb flash drive (modprobe.d) #3260
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#3260
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 @luckylinux on GitHub (Jun 19, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6389
Description
Describe the bug
Weird issues started occurring when I enabled
firejail(and switchedapparmortoenforcingmode).I cannot mount an external USB Flashdrive anymore. I believe also external Hard Drives are affected.
Steps to Reproduce
Steps to reproduce the behavior
Expected behavior
What you expected to happen
USB Storage Drives should work correctly.
External USB Audio Card works correctly for Instance.
Actual behavior
What actually happened
USB Storage Drive doesn't work.
Behavior without a profile
What changed calling
LC_ALL=C firejail --noprofile /path/to/programin aterminal?
Unsure.
Additional context
Any other detail that may help to understand/debug the problem
Output of
sysctl -aattached.Environment
firejail --version): firejail version 0.9.72git rev-parse HEAD): N/AChecklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/program@luckylinux commented on GitHub (Jun 19, 2024):
sysctl.txt
@kmk3 commented on GitHub (Jun 23, 2024):
It seems highly unlikely that this would be caused by firejail.
Does the problem still happens without that?
If yes, does it still happen after running
sudo firecfg --cleananduninstalling firejail?
@luckylinux commented on GitHub (Jun 23, 2024):
I'm pretty sure I tried to "lower" the apparmor settings but it didn't make a difference.
So far I had to use the Laptop (which has a less enforcing apparmor policy and other hardening Settings) when I wanted NFS or an External USB Flashdrive.
On the other side
apparmoris supposed to be in enforcing mode by default on Ubuntu nowadays, so I'm a bit surprised that there isn't a Profile shipped for it, if that is the case.And I do NOT know how to create one to be honest ...
@kmk3 commented on GitHub (Jun 23, 2024):
Does the problem still happen after running
sudo firecfg --clean,uninstalling firejail and rebooting?
@luckylinux commented on GitHub (Jun 23, 2024):
I'm a bit wary of doing that to be honest, given all the trouble it took just to set it up.
Aren't there other alternatives ?
Unfortunately, whatever is causing these issues, isn't being logged much if at all.
@kmk3 commented on GitHub (Jun 23, 2024):
How was firejail set up?
What other changes were done to the system?
Note that
firecfg(1)says that firecfg "automatically loads and forces theAppArmor profile "firejail-default"", so it could be related, though I think
that this loading should not survive a reboot.
This is the command used:
Does running the following command (to remove the profile) change anything?
If not, is there any change if you run
sudo firecfg --cleanand rebootwithout uninstalling firejail?
Other than firecfg loading the apparmor profile, note that firejail itself is
only executed when you call it; there is no daemon running in the background or
anything.
So it will only be of relevance if you call it directly or if you call
something that calls it indirectly.
sudo firecfgcreates symlinks in /usr/local/bin and .desktop files in~/.local/share/applications.
But as far as I know it does not create them for privileged system binaries
(certainly not for binaries related to apparmor or systemd).
@luckylinux commented on GitHub (Jun 23, 2024):
Weird Result:
I cannot reboot right now, it will be tomorrow.
I ran the command though:
So far, NFS nor USB Disks are working yet.
Might be some of the other
sysctl😞. There was some associated Kernel+Network Hardening I did, but I think the issues started AFTER I also introduced Firejail.@kmk3 commented on GitHub (Jun 23, 2024):
Where was firejail installed to?
What is the output of
which -a firejail?How about the following command:
@luckylinux commented on GitHub (Jun 27, 2024):
Yeah maybe I found out the issue for this specific Case ....
In
/etc/modprobe.d/hardening-filesystems.confI was blacklisting:Furthermore in
/etc/modprobe.d/hardening-other.confI was blacklisting:I still need to rebuild initramfs and reboot to test whether the Issue will be solved though.
@luckylinux commented on GitHub (Jun 27, 2024):
I can confirm, removing those entries and rebuilding the initramfs and possibly GRUB Configuration & Rebooting solved the Issue:
I can now mount NFS Mounts and get USB Flashdrives to mount (automounted on Ubuntu using Udisk2 I believe).
So yeah, not
firejailFault at all. Just another part of the Hardening Process that caused this.Sorry for the Trouble 😞.