]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ip_forward: Drop frames with attached skb->sk
authorSebastian Pöhn <sebastian.poehn@gmail.com>
Mon, 20 Apr 2015 07:19:20 +0000 (09:19 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 11:28:08 +0000 (13:28 +0200)
commit70c3d4ae1322b9e9bd7443ef574af5635234a0fa
treea3aee7a5bfb3a4ee3d7258dbeba931ff675ced51
parent6d4397ac828d4198fbec7bf0acd4ce0d832139da
ip_forward: Drop frames with attached skb->sk

[ Upstream commit 2ab957492d13bb819400ac29ae55911d50a82a13 ]

Initial discussion was:
[FYI] xfrm: Don't lookup sk_policy for timewait sockets

Forwarded frames should not have a socket attached. Especially
tw sockets will lead to panics later-on in the stack.

This was observed with TPROXY assigning a tw socket and broken
policy routing (misconfigured). As a result frame enters
forwarding path instead of input. We cannot solve this in
TPROXY as it cannot know that policy routing is broken.

v2:
Remove useless comment

Signed-off-by: Sebastian Poehn <sebastian.poehn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/ipv4/ip_forward.c