linux/security/selinux
Paul Moore da2ea0d056 selinux: handle TCP SYN-ACK packets correctly in selinux_ip_output()
In selinux_ip_output() we always label packets based on the parent
socket.  While this approach works in almost all cases, it doesn't
work in the case of TCP SYN-ACK packets when the correct label is not
the label of the parent socket, but rather the label of the larval
socket represented by the request_sock struct.

Unfortunately, since the request_sock isn't queued on the parent
socket until *after* the SYN-ACK packet is sent, we can't lookup the
request_sock to determine the correct label for the packet; at this
point in time the best we can do is simply pass/NF_ACCEPT the packet.
It must be said that simply passing the packet without any explicit
labeling action, while far from ideal, is not terrible as the SYN-ACK
packet will inherit any IP option based labeling from the initial
connection request so the label *should* be correct and all our
access controls remain in place so we shouldn't have to worry about
information leaks.

Reported-by: Janak Desai <Janak.Desai@gtri.gatech.edu>
Tested-by: Janak Desai <Janak.Desai@gtri.gatech.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Paul Moore <pmoore@redhat.com>
2013-12-04 16:06:47 -05:00
..
include SELinux: Update policy version to support constraints info 2013-11-19 17:34:23 -05:00
ss SELinux: security_load_policy: Silence frame-larger-than warning 2013-11-19 17:35:18 -05:00
.gitignore
avc.c selinux: remove 'flags' parameter from avc_audit() 2013-10-04 14:13:25 -07:00
exports.c
hooks.c selinux: handle TCP SYN-ACK packets correctly in selinux_ip_output() 2013-12-04 16:06:47 -05:00
Kconfig
Makefile
netif.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
netlabel.c selinux: correct locking in selinux_netlbl_socket_connect) 2013-09-26 17:00:46 -04:00
netlink.c
netnode.c selinux: fix problems in netnode when BUG() is compiled out 2013-07-25 13:03:27 -04:00
netport.c
nlmsgtab.c
selinuxfs.c Add SELinux policy capability for always checking packet and peer classes. 2013-07-25 13:03:38 -04:00
xfrm.c selinux: fix possible memory leak 2013-11-25 17:00:33 -05:00