tcp_socket messages
I've started getting the following messages recently, I think it's from a kernel upgrade but as I've been changing my policy so much recently.
It doesn't seem to stop anything from working...
Aug 19 21:02:30 lyta kernel: avc: ?denied ?{ connectto } for ?pid=13505
exe=/usr/bin/kdeinit saddr=127.0.0.1 source=8080 daddr=127.0.0.1 dest=34572
netif=lo scontext=rjc:user_r:user_t tcontext=system_u:system_r:tcp_socket_t
tclass=tcp_socket
Aug 19 21:02:30 lyta kernel: avc: ?denied ?{ connectto } for ?pid=13506
exe=/usr/bin/kdeinit saddr=127.0.0.1 source=8080 daddr=127.0.0.1 dest=34573
netif=lo scontext=rjc:user_r:user_t tcontext=system_u:system_r:tcp_socket_t
tclass=tcp_socket
Aug 19 21:02:34 lyta kernel: avc: ?denied ?{ connectto } for ?pid=13505 exe=/usr/bin/kdeinit saddr=127.0.0.1 source=8080 daddr=127.0.0.1 dest=34582 netif=lo scontext=rjc:user_r:user_t tcontext=system_u:system_r:tcp_socket_t tclass=tcp_socket
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 14 lines · Russell Coker
I've started getting the following messages recently, I think it's from a kernel upgrade but as I've been changing my policy so much recently.
It doesn't seem to stop anything from working...
Aug 19 21:02:30 lyta kernel: avc: ?denied ?{ connectto } for ?pid=13505 exe=/usr/bin/kdeinit saddr=127.0.0.1 source=8080 daddr=127.0.0.1 dest=34572 netif=lo scontext=rjc:user_r:user_t tcontext=system_u:system_r:tcp_socket_t tclass=tcp_socket Aug 19 21:02:30 lyta kernel: avc: ?denied ?{ connectto } for ?pid=13506 exe=/usr/bin/kdeinit saddr=127.0.0.1 source=8080 daddr=127.0.0.1 dest=34573 netif=lo scontext=rjc:user_r:user_t tcontext=system_u:system_r:tcp_socket_t tclass=tcp_socket Aug 19 21:02:34 lyta kernel: avc: ?denied ?{ connectto } for ?pid=13505
Quoted 3 lines
exe=/usr/bin/kdeinit saddr=127.0.0.1 source=8080 daddr=127.0.0.1 dest=34582 netif=lo scontext=rjc:user_r:user_t tcontext=system_u:system_r:tcp_socket_t tclass=tcp_socket
At present, the SELinux module uses the 'tcp_socket' initial SID (with the system_u:system_r:tcp_socket_t context) in two situations:
1) To label the kernel-created TCP reset socket and any traffic generated by it. This should only show up on RST packets, and should never trigger a 'connectto' permission check.
2) To label traffic generated by a TCP socket that has no user socket associated with it yet. This can show up on a SYN ACK from a newly allocated server socket that has not yet been associated with a user socket via accept, and trigger this connectto failure. The server side would then likely continue trying to send the SYN ACK, and will eventually succeed after accept is called and we know the actual SID to use for the server socket. This is a consequence of the original attempt in LSM to merely use the inode security field of the user socket for storing socket security information rather than adding a security field to the struct sock as in the original SELinux kernel patch [see the module technical report's discussion of Socket IPC and Networking Changes in the Changes from the Original SElinux Kernel Patch section].
Since we have recently added a security field to the struct sock and some new hooks to LSM (Rev 1.348 in BitKeeper), we can likely eliminate the second case by saving the proper SID in the struct sock when the tcp_create_openreq_child hook is called and then using this information in the skb_set_owner_w hook to label the traffic. However, I think that this will require passing the listening socket (sk) to the tcp_create_openreq_child hook in addition to the new socket and the network buffer, since the SID will be derived from the listening socket. Wayne?
--
Stephen D. Smalley, NAI Labs
[email protected]
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 12 lines · Stephen Smalley
Since we have recently added a security field to the struct sock and some new hooks to LSM (Rev 1.348 in BitKeeper), we can likely eliminate the second case by saving the proper SID in the struct sock when the
tcp_create_openreq_childhook is called and then using this information in theskb_set_owner_whook to label the traffic. However, I think that this will require passing the listening socket (sk) to thetcp_create_openreq_childhook in addition to the new socket and the network buffer, since the SID will be derived from the listening socket. Wayne?
Yes, this makes sense. The new tcp_create_openreq_child() hook is the
key, so we can now associate a new sock with the listening sock SID. We could either label the skbuff in tcp_create_openreq_child() directly for this case, or save the SID in the sock and allow skb_set_owner_w() label the SKB as is it's function. Having tcp_create_openreq_child() would be slightly more efficient because we can eliminate the checks in skb_set_owner_w() for PF_INET and SOCK_STREAM.
And yes, we'd have to modify the tcp_create_openreq_child() hook to pass
in the in the listening sock struct.
Wayne
--
Wayne Salamon
[email protected]
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.