mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 : 7c13f97ffd ("udp: do fwd memory scheduling on dequeue")
Reported-by: Dmitry Vyukov <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Hannes Frederic Sowa <[email protected]>
Acked-by: Paolo Abeni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
6a413e269b
commit
69629464e0
4 changed files with 11 additions and 5 deletions
|
|
@ -441,7 +441,7 @@ try_again:
|
|||
return err;
|
||||
|
||||
csum_copy_err:
|
||||
if (!__sk_queue_drop_skb(sk, skb, flags)) {
|
||||
if (!__sk_queue_drop_skb(sk, skb, flags, udp_skb_destructor)) {
|
||||
if (is_udp4) {
|
||||
UDP_INC_STATS(sock_net(sk),
|
||||
UDP_MIB_CSUMERRORS, is_udplite);
|
||||
|
|
|
|||
Loading…
Reference in a new issue