Skip to contentSkip to conversation

Patch "tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match()" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 14, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match()

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
tcp-use-ipcb-instead-of-tcp_skb_cb-in-inet_exact_dif_match.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Dec 14 11:45:40 CET 2017

From: David Ahern <[email protected]>
Date: Sun, 3 Dec 2017 09:33:00 -0800
Subject: tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match()

From: David Ahern <[email protected]>

[ Usptream commit b4d1605a8ea608fd7dc45b926a05d75d340bde4b ]

After this fix : ("tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()"), socket lookups happen while skb->cb[] has not been mangled yet by TCP.

Fixes a04a480d4392 ("net: Require exact match for TCP socket lookups if dif is l3mdev")
---
 include/net/tcp.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/net/tcp.h +1 -2
@@ -874,12 +874,11 @@ static inline int tcp_v6_sdif(const stru
 }
 #endif
 
-/* TCP_SKB_CB reference means this can not be used from early demux */
 static inline bool inet_exact_dif_match(struct net *net, struct sk_buff *skb)
 {
 #if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
 	if (!net->ipv4.sysctl_tcp_l3mdev_accept &&
-	    skb && ipv4_l3mdev_skb(TCP_SKB_CB(skb)->header.h4.flags))
+	    skb && ipv4_l3mdev_skb(IPCB(skb)->flags))
 		return true;
 #endif
 	return false;

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/tcp-use-ipcb-instead-of-tcp_skb_cb-in-inet_exact_dif_match.patch queue-4.14/net-ipv6-fixup-device-for-anycast-routes-during-copy.patch