Description of problem: Unable to use ping utility as regular user: $ LANG=C ping google.com ping: socket: Operation not permitted cap_net_raw capability is missing from capabilities of ping binary file: $ getcap `which ping` $ Adding capability manually with sudo setcap cap_net_raw+ep `which ping` fixes issue, but dnf reinstall of iputils package resets it again. Version-Release number of selected component (if applicable): iputils-20190515-7.fc32.x86_64 How reproducible: ping any host as a regular user Steps to Reproduce: 1. ping any host as a regular user Actual results: $ LANG=C ping -c4 google.com ping: socket: Operation not permitted Expected results: $ LANG=C ping -c4 google.com PING google.com (216.58.208.206) 56(84) bytes of data. 64 bytes from waw07s02-in-f14.1e100.net (216.58.208.206): icmp_seq=1 ttl=57 time=23.7 ms 64 bytes from waw07s02-in-f14.1e100.net (216.58.208.206): icmp_seq=2 ttl=57 time=24.8 ms 64 bytes from waw07s02-in-f14.1e100.net (216.58.208.206): icmp_seq=3 ttl=57 time=24.1 ms 64 bytes from waw07s02-in-f14.1e100.net (216.58.208.206): icmp_seq=4 ttl=57 time=25.1 ms --- google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3002ms rtt min/avg/max/mdev = 23.703/24.409/25.065/0.550 ms Additional info: It's quite possible that /usr/bin/ping is not single binary affected by this issue. It seems other other binaries of iputils package are missing capabilities as well.
I can't reproduce this on a freshly installed Fedora 32. If you upgraded from previous versions, you may have to set the 'ping_group_range' kernel knob by hand. See https://bugzilla.redhat.com/show_bug.cgi?id=1699497.
I've found roots of all changes related to ping and ping_group_range in sysctl: https://fedoraproject.org/wiki/Changes/EnableSysctlPingGroupRange In my case problem was in /usr/lib/sysctl.d/50-default.conf which was updated in Fedora 32, but I had local override in /etc/sysctl.d/50-default.conf. I've updated it, everything works, thank you! But my particular case is not important for now. At this moment ping utility in Fedora 32 has to use limited ICMP Echo packets instead of raw sockets. That's enough for basic ping functions, but it's not sufficient for advanced operation modes of ping. Here is example. Let's send ping using specific network interface: $ LANG=C ping -I enp3s0 8.8.8.8 ping: SO_BINDTODEVICE enp3s0: Operation not permitted It doesn't work. However, if I'll reenable cap_net_raw everything will work again: $ LANG=C ping -I enp3s0 8.8.8.8 PING 8.8.8.8 (8.8.8.8) from 192.168.1.62 enp3s0: 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=25.2 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=25.4 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=56 time=24.4 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=56 time=25.8 ms ^C --- 8.8.8.8 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 24.414/25.191/25.766/0.492 ms Obviously, it IS a degradation. It's just a quick example, I think many other ping advanced functions also can't work without raw sockets. Also, there are no real reasons to remove capabilities from ping. It doesn't add any security at all and instead it adds fragile dependency on sysctl defaults which can't be resolved by package manager automatically, so package may be broken in a completely valid environment. Please consider rolling back capability drop.
This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component.
> Also, there are no real reasons to remove capabilities from ping. It doesn't add any security at all and instead it adds fragile dependency on sysctl defaults which can't be resolved by package manager automatically, so package may be broken in a completely valid environment. This was done to make ping work in podman containers. See: https://fedoraproject.org/wiki/Changes/EnableSysctlPingGroupRange I don't think we want to break that. Adding change owner here for any comment...
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle. Changing version to 35.
This seems to be affecting CentOS 8 Stream. All my pings are failing in BackupPC preventing backups from occurring since about Jan 24, 2022.
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13. Fedora Linux 35 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.