Skip to contentSkip to conversation

icmp and rawip socket

DISCUSSION Dominick Grift 2 participants 3 messages Jun 7, 2017 SELinux security module

lore
Share & tools
lore
#0 lore raw

Was it intentional to add icmp_socket class? Because this use to be rawip_socket. rawip_socket includes more than just icmp (IGMP/OSPF) but still I thought that the extended socket classes only applied to what is otherwise generic "socket"

Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8  02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
#1 lore raw
Quoted 4 lines · Dominick Grift

Was it intentional to add icmp_socket class? Because this use to be rawip_socket. rawip_socket includes more than just icmp (IGMP/OSPF) but still I thought that the extended socket classes only applied to what is otherwise generic "socket"

It was intentional, yes, and described in the patch description (for both the kernel and refpolicy) and in the inline documentation for the policy capability in refpolicy. I chose to address all known gaps in our ability to distinguish among sockets at once.

Note btw that icmp_socket is only used for the unprivileged ICMP sockets (aka "ping sockets") created via socket(PF_INET, SOCK_DGRAM, IPPROTO_ICMP) or socket(PF_INET6, SOCK_DGRAM, IPPROTO_ICMP6). rawip_socket is still used for SOCK_RAW ICMP sockets.

#2 lore raw
Quoted 11 lines · Stephen Smalley
Quoted 4 lines · Dominick Grift

Was it intentional to add icmp_socket class? Because this use to be rawip_socket. rawip_socket includes more than just icmp (IGMP/OSPF) but still I thought that the extended socket classes only applied to what is otherwise generic "socket"

It was intentional, yes, and described in the patch description (for both the kernel and refpolicy) and in the inline documentation for the policy capability in refpolicy. I chose to address all known gaps in our ability to distinguish among sockets at once.

Quoted 4 lines

Note btw that icmp_socket is only used for the unprivileged ICMP sockets (aka "ping sockets") created via socket(PF_INET, SOCK_DGRAM, IPPROTO_ICMP) or socket(PF_INET6, SOCK_DGRAM, IPPROTO_ICMP6). rawip_socket is still used for SOCK_RAW ICMP sockets.

Thanks for the answer, I suppose I was unable to connect the dots.

Quoted 3 lines
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8  02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift