mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4208] Issue introduced in glibc 2.33 could lead to perpetual spin in firejail arp code #2578
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#2578
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 @szaydel on GitHub (Apr 22, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4208
This is a bit of an unusual bug report, because while it is exposed by firejail effectively spinning indefinitely, but is a direct consequence of a seemingly small regression introduced in glibc. This is the bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27706. What we observed is that we no longer reach timeouts in
selectcalls (which at least in our testing was usingpselect6system call) in thewhile (1)loop here: https://github.com/netblue30/firejail/blob/master/src/firejail/arp.c#L198, which means the terminating condition is never reached and as a consequence firejail appears to be stuck there forever, making no progress. This is the patch for this problem: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cedbf6d5f3f70ca911176de87d6e453eeab4b7a1 which is seemingly going to be in 2.34 and backported to 2.33. My colleague validated this on 2.33 where we first observed this problem. He also installed ubuntu 21.04 today just to see if the same will happen there, because it is shipping with glibc 2.33, and indeed, he confirmed the problem exists there as well. Effectively, what we are seeing is that the timeout value is not getting updated, and as a consequence the terminating condition is never met. We thought it would be good to report it here, because a) this may happen to someone else, and b) perhaps this implementation should be given another consideration.Expected for this command to exit after a little while, which reliably happens with
glibc < 2.33.However, with
glibc == 2.33this ends-up running indefinitely, which is not the expected behaviour.Regards, Sam.
@rusty-snake commented on GitHub (Jun 10, 2021):
Can we close here?
@kmk3 commented on GitHub (Jun 11, 2021):
@szaydel commented on Apr 22:
For reference, this is the current bug status:
The patch appears to have landed on the "release/2.33" branch:
But it seems that there hasn't been any new release in the 2.33 series.
I see; thanks for reporting.
Do you mean in firejail's arp code? Feel free to suggest improvements.
@ghost commented on GitHub (Jun 11, 2021):
$
pacman -Q glibc$
./src/firejail/firejail --version$
time sudo ./src/fnet/fnet printif scanThis is Arch Linux, cannot reproduce with firejail compiled from git master. Command exits reliably. I'm not sure but it seems glibc on Arch Linux does not carry the patch you reference (cfr. the latest PKGBUILD changes).
What firejail version are you seeing this on?
@kmk3 commented on GitHub (Jun 11, 2021):
(Offtopic)
The
consoleinfo string can be used for shell commands and theiroutput. Example:
Output:
I think that it applies syntax highlighting only on the command line, but not
on the output (other than making it all blue, that is).
@szaydel commented on GitHub (Jun 14, 2021):
@glitsj16 - I am fairly sure that at the time I reported this,
firejailwas built from current master. I will have to see if I can repro.@rusty-snake commented on GitHub (Aug 4, 2021):
Can we close here?
@szaydel commented on GitHub (Aug 5, 2021):
Yeah, sorry I have been too busy lately to look into this. I think this glibc issue has been addressed upstream anyway at this point, and so it is perhaps not meaningful to keep this open. I will do some investigation when I have some time, and if there is a reason, I can re-open. Thanks @rusty-snake !