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]
Message-Id: <20121022.151758.1535731378259139241.davem@davemloft.net>
Date:	Mon, 22 Oct 2012 15:17:58 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	mk.fraggod@...il.com, paul@...l-moore.com, netdev@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] net: fix secpath kmemleak

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Mon, 22 Oct 2012 21:03:40 +0200

> From: Eric Dumazet <edumazet@...gle.com>
> 
> Mike Kazantsev found 3.5 kernels and beyond were leaking memory,
> and tracked the faulty commit to a1c7fff7e18f59e (net:
> netdev_alloc_skb() use build_skb()
> 
> While this commit seems fine, it uncovered a bug introduced
> in commit bad43ca8325 (net: introduce skb_try_coalesce()), in function
> kfree_skb_partial() :
> 
> If head is stolen, we free the sk_buff,
> without removing references on secpath (skb->sp).
> 
> So IPsec + IP defrag/reassembly (using skb coalescing), or
> TCP coalescing could leak secpath objects.
> 
> Fix this bug by calling skb_release_head_state(skb) to properly
> release all possible references to linked objects.
> 
> Reported-by: Mike Kazantsev <mk.fraggod@...il.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Bisected-by: Mike Kazantsev <mk.fraggod@...il.com>
> Tested-by: Mike Kazantsev <mk.fraggod@...il.com>

Applied and queued up for -stable, thanks!

> It seems TCP stack could immediately release secpath references instead
> of waiting skb are eaten by consumer, thats will be a followup patch.

Indeed.
--
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