ICMP sockets
Interestingly, this patch has been trimmed down from the version which is applied to Openwall kernels. In the full version, the ability to create ICMP sockets is restricted to a specific group, which can be set by way of a sysctl knob. The ping binary is then installed setgid. In this way, full access to ICMP sockets is not given to unprivileged users, while ping only gets enough privilege to create such sockets. The group check was removed from the posted patch to make acceptance easier, but it seems likely to be added back before the next posting.
For more information about the thinking behind this design, see this message from Solar Designer.
| Index entries for this article | |
|---|---|
| Kernel | Networking |
Posted Dec 25, 2010 4:29 UTC (Sat)
by brouhaha (subscriber, #1698)
[Link] (2 responses)
Posted Dec 27, 2010 14:05 UTC (Mon)
by Kwi (subscriber, #59584)
[Link]
If, at some point, other ICMP messages are deemed safe for use by non-privileged users, they can be enabled in the implementation, without changing the interface.
Posted Jul 22, 2011 6:48 UTC (Fri)
by arekm (guest, #4846)
[Link]
If it can't be used for anything but ping, by design, then why not call it a ping socket? "ICMP socket" is clearly a misnomer.
ICMP sockets
ICMP sockets
ICMP sockets
