mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6740] Cannot blacklist /run: disable_file: No such file or directory #3349
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#3349
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 @kolAflash on GitHub (May 6, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6740
Description
I'd like to use
--blacklist=/run, but Firejail crashes.Steps to Reproduce
Steps to reproduce the behavior
LC_ALL=C firejail --noprofile --blacklist=/runExpected behavior
/runbeing restricted, maybe with the exception of/run/firejail/.Actual behavior
Firejail crashes.
Environment
uname -srm):Linux 6.1.0-34-amd64 x86_64Debian-12firejail --version):0.9.72Additional test with Debian-13 testing:
Checklist
/usr/bin/vlc) "fixes" it).[ ] The program has a profile. (If not, request one inhttps://github.com/netblue30/firejail/issues/1139)[ ] The profile (and redirect profile if exists) hasn't already been fixed upstream.[ ] I'm aware ofbrowser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.[ ] I used--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail --noprofile --blacklist=/runOutput of
LC_ALL=C firejail --debug --noprofile --blacklist=/runMisc
Similar issue with
--read-only=/run.Maybe remotely related:
@kmk3 commented on GitHub (May 12, 2025):
This happens because blacklisting is done by bind-mounting a dummy
file/directory from /run/firejail on top of the real file/directory.
If you blacklist /run, firejail can't access the paths inside /run/firejail in
order to perform the bind-mounting and accomplish the blacklisting.
This is made clearer with #6747:
To blacklist
/run, firejail bind-mounts/run/firejail/firejail.ro.dir(apath with no read/write/execute permissions) on top of
/run.When trying to blacklist the next path,
/sys/fs,/run/firejail/firejail.ro.diris not accessible, so firejail exits.Maybe it could be made to work by keeping a reference to the original
/run(or
/run/firejail) path and using that for blacklisting paths.Currently you can try the following instead:
@kolAflash commented on GitHub (May 13, 2025):
@kmk3 Thanks!
--noblacklist=/run/firejail --blacklist='/run/*'seems to work fine. An additional--whitelistdoesn't even seem to be needed.I guess this won't block directories which are created below
/run/after Firejail is started. So I'd appreciate a fix allowing to simply--blacklist='/run/.@kmk3 commented on GitHub (May 13, 2025):
No problem.
That's what
--whitelist=/run/firejailis for.