tcp: tcp_v4_err() should be more careful
authorEric Dumazet <edumazet@google.com>
Fri, 15 Feb 2019 21:36:21 +0000 (13:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Feb 2019 08:07:26 +0000 (09:07 +0100)
commit1bdb1675f33f321ad750c633792a6c0ad718a965
tree92e334d812995579a3ff8e0b7bbb1f592ecec602
parentdf1b583c1654133825d4a9e5e7e048d0edb32bda
tcp: tcp_v4_err() should be more careful

[ Upstream commit 2c4cc9712364c051b1de2d175d5fbea6be948ebf ]

ICMP handlers are not very often stressed, we should
make them more resilient to bugs that might surface in
the future.

If there is no packet in retransmit queue, we should
avoid a NULL deref.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: soukjin bae <soukjin.bae@samsung.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp_ipv4.c