]> git.baikalelectronics.ru Git - kernel.git/commit
udp: properly cope with csum errors
authorEric Dumazet <edumazet@google.com>
Sun, 5 Feb 2017 17:25:24 +0000 (09:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 16:19:00 +0000 (11:19 -0500)
commitf8ce450e3c55775ba4b29293390e4fd5d7c4d325
treea0fc1812afaf992b01042e2bf081c455addc16ab
parentb5ca03fcc99a701caa77875ee3972560ba60d730
udp: properly cope with csum errors

Dmitry reported that UDP sockets being destroyed would trigger the
WARN_ON(atomic_read(&sk->sk_rmem_alloc)); in inet_sock_destruct()

It turns out we do not properly destroy skb(s) that have wrong UDP
checksum.

Thanks again to syzkaller team.

Fixes : d6dc1df33f96 ("udp: do fwd memory scheduling on dequeue")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/datagram.c
net/ipv4/udp.c
net/ipv6/udp.c