]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix tcp_send_syn_data()
authorEric Dumazet <edumazet@google.com>
Wed, 18 Oct 2017 21:20:30 +0000 (14:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Oct 2017 00:44:05 +0000 (01:44 +0100)
commitb86a9ffe29d8d658df1568fdc9a5094ad691a8c6
treee1ead62e71ec931b1abeb1740a5dd649b490665d
parent38f34b2d30555593423e03ebc73bf1e6d6920588
tcp: fix tcp_send_syn_data()

syn_data was allocated by sk_stream_alloc_skb(), meaning
its destructor and _skb_refdst fields are mangled.

We need to call tcp_skb_tsorted_anchor_cleanup() before
calling kfree_skb() or kernel crashes.

Bug was reported by syzkaller bot.

Fixes: 1e04e217c50d ("tcp: new list for sent but unacked skbs for RACK recovery")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c