Files
linux/security
Paul Moore 348d786715 selinux: handle TCP SYN-ACK packets correctly in selinux_ip_postroute()
commit 446b802437 upstream.

In selinux_ip_postroute() we perform access checks based on the
packet's security label.  For locally generated traffic we get the
packet's security label from the associated socket; this works in all
cases except for TCP SYN-ACK packets.  In the case of SYN-ACK packet's
the correct security label is stored in the connection's request_sock,
not the server's socket.  Unfortunately, at the point in time when
selinux_ip_postroute() is called we can't query the request_sock
directly, we need to recreate the label using the same logic that
originally labeled the associated request_sock.

See the inline comments for more explanation.

Reported-by: Janak Desai <Janak.Desai@gtri.gatech.edu>
Tested-by: Janak Desai <Janak.Desai@gtri.gatech.edu>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 07:45:09 -08:00
..
2013-02-22 23:31:31 -05:00
2013-11-29 11:11:44 -08:00
2013-05-07 20:16:25 -07:00
2013-04-03 13:13:51 +11:00
2013-02-26 02:46:10 -05:00
2013-04-18 11:34:35 -07:00
2012-01-10 10:20:35 -05:00
2012-02-10 09:18:52 +11:00