[GH-ISSUE #1912] Ping replies going to wrong jails #1282

Closed
opened 2026-05-05 07:47:18 -06:00 by gitea-mirror · 14 comments
Owner

Originally created by @reinerh on GitHub (Apr 26, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1912

As reported here, when two ping processes are running in two separate jails, they BOTH receive ALL the replies.

Example (running both commands at the same time):

$ firejail ping ubuntu.com
PING ubuntu.com (91.189.94.40) 56(84) bytes of data.
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=1 ttl=57 time=42.3 ms
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=1 ttl=54 time=43.8 ms (DUP!)
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=2 ttl=57 time=39.9 ms
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=2 ttl=54 time=46.3 ms (DUP!)
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=3 ttl=57 time=40.0 ms
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=3 ttl=54 time=44.2 ms (DUP!)
$ firejail ping debian.org
PING debian.org (5.153.231.4) 56(84) bytes of data.
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=1 ttl=54 time=43.8 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=2 ttl=57 time=39.9 ms
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=2 ttl=54 time=46.3 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=3 ttl=57 time=40.0 ms
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=3 ttl=54 time=44.2 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=4 ttl=57 time=41.6 ms
64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=4 ttl=54 time=42.4 ms

Originally created by @reinerh on GitHub (Apr 26, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1912 As reported [here](https://bugs.debian.org/896989), when two ping processes are running in two separate jails, they BOTH receive ALL the replies. Example (running both commands at the same time): ``` $ firejail ping ubuntu.com PING ubuntu.com (91.189.94.40) 56(84) bytes of data. 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=1 ttl=57 time=42.3 ms 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=1 ttl=54 time=43.8 ms (DUP!) 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=2 ttl=57 time=39.9 ms 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=2 ttl=54 time=46.3 ms (DUP!) 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=3 ttl=57 time=40.0 ms 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=3 ttl=54 time=44.2 ms (DUP!) ``` ``` $ firejail ping debian.org PING debian.org (5.153.231.4) 56(84) bytes of data. 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=1 ttl=54 time=43.8 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=2 ttl=57 time=39.9 ms 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=2 ttl=54 time=46.3 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=3 ttl=57 time=40.0 ms 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=3 ttl=54 time=44.2 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=4 ttl=57 time=41.6 ms 64 bytes from senfter.debian.org (5.153.231.4): icmp_seq=4 ttl=54 time=42.4 ms ```
gitea-mirror 2026-05-05 07:47:18 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SkewedZeppelin commented on GitHub (Apr 26, 2018):

That seems pretty bad. Is this just limited to still having extra capabilities (net_raw)? ie. not a general flaw of firejail?

<!-- gh-comment-id:384794626 --> @SkewedZeppelin commented on GitHub (Apr 26, 2018): That seems pretty bad. Is this just limited to still having extra capabilities (net_raw)? ie. not a general flaw of firejail?
Author
Owner

@reinerh commented on GitHub (Apr 26, 2018):

It doesn't behave that way when running both pings as root without firejail.
Maybe related to network namespaces?

<!-- gh-comment-id:384796282 --> @reinerh commented on GitHub (Apr 26, 2018): It doesn't behave that way when running both pings as root without firejail. Maybe related to network namespaces?
Author
Owner

@netblue30 commented on GitHub (Apr 30, 2018):

Removed form firecfg, so we don't have a simlink for it under /usr/local/bin. I have no idea what's going on!

<!-- gh-comment-id:385430556 --> @netblue30 commented on GitHub (Apr 30, 2018): Removed form firecfg, so we don't have a simlink for it under /usr/local/bin. I have no idea what's going on!
Author
Owner

@Fred-Barclay commented on GitHub (May 1, 2018):

I can't replicate on Arch but can on Ubuntu 18.04. Maybe a library difference?

<!-- gh-comment-id:385574758 --> @Fred-Barclay commented on GitHub (May 1, 2018): I can't replicate on Arch but can on Ubuntu 18.04. Maybe a library difference?
Author
Owner

@SkewedZeppelin commented on GitHub (May 1, 2018):

@Fred-Barclay that is a bit weird. I just replicated again on both Arch and Fedora 27.

<!-- gh-comment-id:385578430 --> @SkewedZeppelin commented on GitHub (May 1, 2018): @Fred-Barclay that is a bit weird. I just replicated again on both Arch and Fedora 27.
Author
Owner

@Fred-Barclay commented on GitHub (May 1, 2018):

@SkewedZeppelin What version of firejail did you use? I'm using firejail 0.9.53.

$ firejail ping ubuntu.com
PING ubuntu.com (91.189.94.40) 56(84) bytes of data.
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=1 ttl=48 time=132 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=2 ttl=48 time=133 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=3 ttl=48 time=132 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=4 ttl=48 time=135 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=5 ttl=48 time=139 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=6 ttl=48 time=132 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=7 ttl=48 time=143 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=8 ttl=48 time=135 ms
64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=9 ttl=48 time=132 ms
$ firejail ping debian.org
PING debian.org(klecker-misc.debian.org (2001:67c:2564:a119::148:14)) 56 data bytes
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=1 ttl=48 time=148 ms
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=2 ttl=48 time=147 ms
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=3 ttl=48 time=148 ms
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=4 ttl=48 time=149 ms
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=5 ttl=48 time=146 ms
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=6 ttl=48 time=148 ms
64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=7 ttl=48 time=149 ms
<!-- gh-comment-id:385582431 --> @Fred-Barclay commented on GitHub (May 1, 2018): @SkewedZeppelin What version of firejail did you use? I'm using firejail 0.9.53. ``` $ firejail ping ubuntu.com PING ubuntu.com (91.189.94.40) 56(84) bytes of data. 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=1 ttl=48 time=132 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=2 ttl=48 time=133 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=3 ttl=48 time=132 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=4 ttl=48 time=135 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=5 ttl=48 time=139 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=6 ttl=48 time=132 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=7 ttl=48 time=143 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=8 ttl=48 time=135 ms 64 bytes from ovinnik.canonical.com (91.189.94.40): icmp_seq=9 ttl=48 time=132 ms ``` ``` $ firejail ping debian.org PING debian.org(klecker-misc.debian.org (2001:67c:2564:a119::148:14)) 56 data bytes 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=1 ttl=48 time=148 ms 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=2 ttl=48 time=147 ms 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=3 ttl=48 time=148 ms 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=4 ttl=48 time=149 ms 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=5 ttl=48 time=146 ms 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=6 ttl=48 time=148 ms 64 bytes from klecker-misc.debian.org (2001:67c:2564:a119::148:14): icmp_seq=7 ttl=48 time=149 ms ```
Author
Owner

@Fred-Barclay commented on GitHub (May 1, 2018):

Ah, scratch that. Apparently if I make sure the addresses I ping are both IPv4 or IPv6, I can duplicate.

$ firejail ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=26.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=27.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=28.4 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=25.7 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=55 time=28.7 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=55 time=27.0 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=55 time=25.5 ms
64 bytes from 9.9.9.9: icmp_seq=1 ttl=52 time=26.0 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=8 ttl=55 time=44.6 ms
64 bytes from 9.9.9.9: icmp_seq=2 ttl=52 time=28.3 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=9 ttl=55 time=25.5 ms
64 bytes from 9.9.9.9: icmp_seq=3 ttl=52 time=30.3 ms (DUP!)
$ firejail ping 9.9.9.9
PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.
64 bytes from 9.9.9.9: icmp_seq=1 ttl=52 time=26.0 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=55 time=44.6 ms
64 bytes from 9.9.9.9: icmp_seq=2 ttl=52 time=28.3 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=55 time=25.5 ms
64 bytes from 9.9.9.9: icmp_seq=3 ttl=52 time=30.3 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=55 time=25.5 ms
64 bytes from 9.9.9.9: icmp_seq=4 ttl=52 time=27.0 ms
64 bytes from 8.8.8.8: icmp_seq=11 ttl=55 time=25.7 ms
64 bytes from 9.9.9.9: icmp_seq=5 ttl=52 time=26.0 ms

Similar when both are ping -6

<!-- gh-comment-id:385582899 --> @Fred-Barclay commented on GitHub (May 1, 2018): Ah, scratch that. Apparently if I make sure the addresses I ping are **both** IPv4 or IPv6, I can duplicate. ``` $ firejail ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=26.5 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=27.5 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=28.4 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=25.7 ms 64 bytes from 8.8.8.8: icmp_seq=5 ttl=55 time=28.7 ms 64 bytes from 8.8.8.8: icmp_seq=6 ttl=55 time=27.0 ms 64 bytes from 8.8.8.8: icmp_seq=7 ttl=55 time=25.5 ms 64 bytes from 9.9.9.9: icmp_seq=1 ttl=52 time=26.0 ms (DUP!) 64 bytes from 8.8.8.8: icmp_seq=8 ttl=55 time=44.6 ms 64 bytes from 9.9.9.9: icmp_seq=2 ttl=52 time=28.3 ms (DUP!) 64 bytes from 8.8.8.8: icmp_seq=9 ttl=55 time=25.5 ms 64 bytes from 9.9.9.9: icmp_seq=3 ttl=52 time=30.3 ms (DUP!) ``` ``` $ firejail ping 9.9.9.9 PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data. 64 bytes from 9.9.9.9: icmp_seq=1 ttl=52 time=26.0 ms 64 bytes from 8.8.8.8: icmp_seq=8 ttl=55 time=44.6 ms 64 bytes from 9.9.9.9: icmp_seq=2 ttl=52 time=28.3 ms 64 bytes from 8.8.8.8: icmp_seq=9 ttl=55 time=25.5 ms 64 bytes from 9.9.9.9: icmp_seq=3 ttl=52 time=30.3 ms 64 bytes from 8.8.8.8: icmp_seq=10 ttl=55 time=25.5 ms 64 bytes from 9.9.9.9: icmp_seq=4 ttl=52 time=27.0 ms 64 bytes from 8.8.8.8: icmp_seq=11 ttl=55 time=25.7 ms 64 bytes from 9.9.9.9: icmp_seq=5 ttl=52 time=26.0 ms ``` Similar when both are `ping -6`
Author
Owner

@chiraag-nataraj commented on GitHub (May 2, 2018):

I just replicated this in Debian sid/experimental with firejail 0.9.53.

<!-- gh-comment-id:385856757 --> @chiraag-nataraj commented on GitHub (May 2, 2018): I just replicated this in Debian sid/experimental with firejail 0.9.53.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 24, 2018):

Y'all, this is still an issue. How can we go about debugging this?

<!-- gh-comment-id:407244354 --> @chiraag-nataraj commented on GitHub (Jul 24, 2018): Y'all, this is still an issue. How can we go about debugging this?
Author
Owner

@chiraag-nataraj commented on GitHub (Oct 3, 2018):

Okay, if this helps, I'm not seeing this when I create two separate network namespaces, but I still see the issue with the current firejail version (0.9.57 from master).

<!-- gh-comment-id:426512052 --> @chiraag-nataraj commented on GitHub (Oct 3, 2018): Okay, if this helps, I'm not seeing this when I create two separate network namespaces, but I still see the issue with the current `firejail` version (`0.9.57` from `master`).
Author
Owner

@chiraag-nataraj commented on GitHub (May 21, 2019):

Still seeing this with current git master. How should we go about addressing this?

<!-- gh-comment-id:494350022 --> @chiraag-nataraj commented on GitHub (May 21, 2019): Still seeing this with current git master. How should we go about addressing this?
Author
Owner

@chiraag-nataraj commented on GitHub (May 21, 2019):

As I replied earlier, when I create new network namespaces, I'm not seeing the issue. Is this issue specific to ping or does it apply to other programs as well?

<!-- gh-comment-id:494402510 --> @chiraag-nataraj commented on GitHub (May 21, 2019): As I replied earlier, when I create new network namespaces, I'm not seeing the issue. Is this issue specific to ping or does it apply to other programs as well?
Author
Owner

@matu3ba commented on GitHub (Sep 9, 2020):

On arch I can not reproduce with current master and the following commands:

firejail ping 8.8.8.8
firejail ping 9.9.9.9

Closing or testing against other distros?

<!-- gh-comment-id:689203013 --> @matu3ba commented on GitHub (Sep 9, 2020): On arch I can not reproduce with current master and the following commands: ``` firejail ping 8.8.8.8 firejail ping 9.9.9.9 ``` Closing or testing against other distros?
Author
Owner

@reinerh commented on GitHub (Sep 9, 2020):

I can confirm that I can no longer reproduce it.
Not even with the originally reported version (0.9.52).
So I guess it has been fixed somewhere else (kernel, glibc?).

I'll close it, as nothing needs to be fixed on the firejail side.

<!-- gh-comment-id:689680960 --> @reinerh commented on GitHub (Sep 9, 2020): I can confirm that I can no longer reproduce it. Not even with the originally reported version (0.9.52). So I guess it has been fixed somewhere else (kernel, glibc?). I'll close it, as nothing needs to be fixed on the firejail side.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1282
No description provided.