]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix possible NULL dereference in tcp_vX_send_reset()
authorEric Dumazet <edumazet@google.com>
Tue, 25 Nov 2014 15:40:04 +0000 (07:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2014 19:29:18 +0000 (14:29 -0500)
commit34c7b52a6c56e1baa7947fc41b8058124811f53b
treea25e9383d5b91d6062aa4770e6a181e9079d0396
parentf3fe6cb4c18df64d43027bdea0e3aaeb1af78c28
tcp: fix possible NULL dereference in tcp_vX_send_reset()

After commit 1c02ca1b7142 ("tcp: remove dst refcount false sharing for
prequeue mode") we have to relax check against skb dst in
tcp_v[46]_send_reset() if prequeue dropped the dst.

If a socket is provided, a full lookup was done to find this socket,
so the dst test can be skipped.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88191
Reported-by: Jaša Bartelj <jasa.bartelj@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Daniel Borkmann <dborkman@redhat.com>
Fixes: 1c02ca1b7142 ("tcp: remove dst refcount false sharing for prequeue mode")
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c