Thread (16 messages) 16 messages, 5 authors, 2012-08-10

Re: [PATCH] ipv4: tcp: unicast_sock should not land outside of TCP stack

flat view

From: David Miller <davem@davemloft.net>
Date: 2012-08-10 04:05:51
Also in: lkml

From: Eric Dumazet <redacted>
Date: Fri, 10 Aug 2012 01:56:06 +0200
From: Eric Dumazet <redacted>

commit be9f4a44e7d41cee (ipv4: tcp: remove per net tcp_sock) added a
selinux regression, reported and bisected by John Stultz

selinux_ip_postroute_compat() expect to find a valid sk->sk_security
pointer, but this field is NULL for unicast_sock

It turns out that unicast_sock are really temporary stuff to be able
to reuse  part of IP stack (ip_append_data()/ip_push_pending_frames())

Fact is that frames sent by ip_send_unicast_reply() should be orphaned
to not fool LSM.

Note IPv6 never had this problem, as tcp_v6_send_response() doesnt use a
fake socket at all. I'll probably implement tcp_v4_send_response() to
remove these unicast_sock in linux-3.7

Reported-by: John Stultz <redacted>
Bisected-by: John Stultz [off-list ref]
Signed-off-by: Eric Dumazet <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help