lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 17 Sep 2016 10:00:32 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     eric.dumazet@...il.com
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net] net: avoid sk_forward_alloc overflows

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 15 Sep 2016 08:48:46 -0700

> From: Eric Dumazet <edumazet@...gle.com>
> 
> A malicious TCP receiver, sending SACK, can force the sender to split
> skbs in write queue and increase its memory usage.
> 
> Then, when socket is closed and its write queue purged, we might
> overflow sk_forward_alloc (It becomes negative)
> 
> sk_mem_reclaim() does nothing in this case, and more than 2GB
> are leaked from TCP perspective (tcp_memory_allocated is not changed)
> 
> Then warnings trigger from inet_sock_destruct() and
> sk_stream_kill_queues() seeing a not zero sk_forward_alloc
> 
> All TCP stack can be stuck because TCP is under memory pressure.
> 
> A simple fix is to preemptively reclaim from sk_mem_uncharge().
> 
> This makes sure a socket wont have more than 2 MB forward allocated,
> after burst and idle period.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ