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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Apr 2015 14:15:34 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	johunt@...mai.com, netdev@...r.kernel.org, edumazet@...gle.com,
	gthelen@...gle.com, rientjes@...gle.com
Subject: Re: [PATCH net] tcp: fix possible deadlock in tcp_send_fin()

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 21 Apr 2015 18:32:24 -0700

> From: Eric Dumazet <edumazet@...gle.com>
> 
> Using sk_stream_alloc_skb() in tcp_send_fin() is dangerous in
> case a huge process is killed by OOM, and tcp_mem[2] is hit.
> 
> To be able to free memory we need to make progress, so this
> patch allows FIN packets to not care about tcp_mem[2], if
> skb allocation succeeded.
> 
> In a follow-up patch, we might abort tcp_send_fin() infinite loop
> in case TIF_MEMDIE is set on this thread, as memory allocator
> did its best getting extra memory already. 
> 
> This patch reverts d22e15371811 ("tcp: fix tcp fin memory accounting")
> 
> Fixes: d22e15371811 ("tcp: fix tcp fin memory accounting")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Applied and queued up for -stable, since the tcp fin memory accounting change
went to -stable already.

Wrt. longer term solutions, I would even be OK at this point aborting
the connection altogether if the skb allocation fails period.  Not
just if TIF_MEMDIE is set.  That endless loop has been nothing but
trouble.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ