mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5650] private-etc breaks with 'net none' and 'dns=foo' #3055
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#3055
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 8, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5650
During testing of the recent private-etc refactoring (mostly in
5d0822c52c) I think there's a bug under specific conditions. I'll keep digging to try to pinpoint it as accurate as I can, but the below might already be a reproducer.Relates to #5610 (see this comment).
This works as expected:
These (and similar) variations however keeps failing for me:
Note that the actual value of
private-etcdoesn't matter. Whendnsis there it will alway fail in my tests.Current code logic in
fs_etc.calways tries to create a new /etc/resolv.conf, even when networking is disabled via --net=none:45a641deab/src/firejail/fs_etc.c (L113-L121)If I understand the relevant code there, I think it would make sense to create /etc/resolv.conf in a more conditional way, something like:
Can anyone reproduce this? Thoughts on how to fix this in a safer way (if indeed this is a bug)?
UPDATE: I've made a small patch that seems to work for me. Here it is if anyone wants to test it:
Do note that this needs to go on top of current git master.
@ghost commented on GitHub (Mar 15, 2023):
UPDATED PATCH (fixed misleading indentation):@kmk3 commented on GitHub (Aug 18, 2024):
@glitsj16
It looks like #5737 was supposed to fix this.
Does the issue still happen?
@ghost commented on GitHub (Aug 18, 2024):
@kmk3
This issue is fixed. Closing.