]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.7/tcp-remove-buggy-call-to-tcp_v6_restore_cb.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.14.7 / tcp-remove-buggy-call-to-tcp_v6_restore_cb.patch
CommitLineData
fa55523a
GKH
1From foo@baz Thu Dec 14 11:45:40 CET 2017
2From: Eric Dumazet <edumazet@google.com>
3Date: Wed, 29 Nov 2017 17:43:57 -0800
4Subject: tcp: remove buggy call to tcp_v6_restore_cb()
5
6From: Eric Dumazet <edumazet@google.com>
7
8
9[ Upstream commit 3016dad75b48279e579117ee3ed566ba90a3b023 ]
10
11tcp_v6_send_reset() expects to receive an skb with skb->cb[] layout as
12used in TCP stack.
13MD5 lookup uses tcp_v6_iif() and tcp_v6_sdif() and thus
14TCP_SKB_CB(skb)->header.h6
15
16This patch probably fixes RST packets sent on behalf of a timewait md5
17ipv6 socket.
18
19Before Florian patch, tcp_v6_restore_cb() was needed before jumping to
20no_tcp_socket label.
21
22Fixes: 271c3b9b7bda ("tcp: honour SO_BINDTODEVICE for TW_RST case too")
23Signed-off-by: Eric Dumazet <edumazet@google.com>
24Cc: Florian Westphal <fw@strlen.de>
25Acked-by: Florian Westphal <fw@strlen.de>
26Signed-off-by: David S. Miller <davem@davemloft.net>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28---
29 net/ipv6/tcp_ipv6.c | 1 -
30 1 file changed, 1 deletion(-)
31
32--- a/net/ipv6/tcp_ipv6.c
33+++ b/net/ipv6/tcp_ipv6.c
34@@ -1585,7 +1585,6 @@ do_time_wait:
35 tcp_v6_timewait_ack(sk, skb);
36 break;
37 case TCP_TW_RST:
38- tcp_v6_restore_cb(skb);
39 tcp_v6_send_reset(sk, skb);
40 inet_twsk_deschedule_put(inet_twsk(sk));
41 goto discard_it;