summaryrefslogtreecommitdiffstats
path: root/Documentation/extcon
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-04-08 17:07:33 +0200
committerDavid S. Miller <davem@davemloft.net>2017-04-10 03:27:28 +0200
commit17c3060b1701fc69daedb4c90be6325d3d9fca8e (patch)
treec150ad0125b753402cc71a88c863b5597f4c6b56 /Documentation/extcon
parentMerge tag 'linux-can-fixes-for-4.12-20170404' of git://git.kernel.org/pub/scm... (diff)
downloadlinux-17c3060b1701fc69daedb4c90be6325d3d9fca8e.tar.xz
linux-17c3060b1701fc69daedb4c90be6325d3d9fca8e.zip
tcp: clear saved_syn in tcp_disconnect()
In the (very unlikely) case a passive socket becomes a listener, we do not want to duplicate its saved SYN headers. This would lead to double frees, use after free, and please hackers and various fuzzers Tested: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, IPPROTO_TCP, TCP_SAVE_SYN, [1], 4) = 0 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 5) = 0 +0 < S 0:0(0) win 32972 <mss 1460,nop,wscale 7> +0 > S. 0:0(0) ack 1 <...> +.1 < . 1:1(0) ack 1 win 257 +0 accept(3, ..., ...) = 4 +0 connect(4, AF_UNSPEC, ...) = 0 +0 close(3) = 0 +0 bind(4, ..., ...) = 0 +0 listen(4, 5) = 0 +0 < S 0:0(0) win 32972 <mss 1460,nop,wscale 7> +0 > S. 0:0(0) ack 1 <...> +.1 < . 1:1(0) ack 1 win 257 Fixes: cd8ae85299d5 ("tcp: provide SYN headers for passive connections") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/extcon')
0 files changed, 0 insertions, 0 deletions