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:	Tue, 17 Jun 2008 15:57:12 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Pekka Enberg <penberg@...helsinki.fi>
CC:	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, mpm@...enic.com, clameter@....com
Subject: Re: [PATCH] netfilter: use krealloc() in nf_conntrack_extend.c V2

Pekka Enberg wrote:
> Patrick McHardy wrote:
>> Great, thanks for the explanation. Is this patch targeted
>> at 2.6.26 or 2.6.27?
> 
> I don't think we will be removing ksize() in 2.6.26 anyway so 2.6.27 is 
> fine for this patch. Thanks!

Your patch introduced a use-after-free and double-free.
krealloc() frees the old pointer, but it is still used
for the ->move operations, then freed again.

To fix this I think we need a __krealloc() that doesn't
free the old memory, especially since it must not be
freed immediately because it may still be used in a RCU
read side (see the last part in the patch attached to
this mail (based on a kernel without your patch)).



View attachment "01.diff" of type "text/x-diff" (3307 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ