]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ipv6: tcp: add a missing tcp_v6_restore_cb()
authorEric Dumazet <edumazet@google.com>
Mon, 6 Feb 2017 04:23:22 +0000 (20:23 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 6 Apr 2017 08:19:23 +0000 (09:19 +0100)
commite7223f2d525bfb66725b977c68728d2928a4a650
treed06ff2247d25f66bb055b5bdc726da437df8434a
parentb5d38331d3ea1246d4aae818ef73a32b0a2b0fe0
ipv6: tcp: add a missing tcp_v6_restore_cb()

BugLink: http://bugs.launchpad.net/bugs/1666324
[ Upstream commit ebf6c9cb23d7e56eec8575a88071dec97ad5c6e2 ]

Dmitry reported use-after-free in ip6_datagram_recv_specific_ctl()

A similar bug was fixed in commit 8ce48623f0cf ("ipv6: tcp: restore
IP6CB for pktoptions skbs"), but I missed another spot.

tcp_v6_syn_recv_sock() can indeed set np->pktoptions from ireq->pktopts

Fixes: 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
net/ipv6/tcp_ipv6.c