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:	Thu, 18 Oct 2012 05:33:33 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	David Rientjes <rientjes@...gle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Fengguang Wu <fengguang.wu@...el.com>,
	Li Zefan <lizefan@...wei.com>,
	Aristeu Rozanski <aris@...hat.com>, Tejun Heo <tj@...nel.org>,
	Mimi Zohar <zohar@...ux.vnet.ibm.com>,
	James Morris <jmorris@...ei.org>,
	Dmitry Kasatkin <dmitry.kasatkin@...el.com>,
	linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: Re: [patch for-3.7] fs, xattr: fix bug when removing a name not in
 xattr list

On Wed, Oct 17, 2012 at 08:55:49PM -0700, Hugh Dickins wrote:
> On Wed, 17 Oct 2012, David Rientjes wrote:
> 
> > Commit 38f38657444d ("xattr: extract simple_xattr code from tmpfs") moved
> > some code from tmpfs but introduced a subtle bug along the way.
> > 
> > If the name passed to simple_xattr_remove() does not exist in the list of
> > xattrs, then it is possible to call kfree(new_xattr) when new_xattr is
> > actually initialized to itself on the stack via uninitialized_var().
> > 
> > This causes a BUG() since the memory was not allocated via the slab
> > allocator and was not bypassed through to the page allocator because it
> > was too large.
> > 
> > Initialize the local variable to NULL so the kfree() never takes place.
> > 
> > Reported-by: Fengguang Wu <fengguang.wu@...el.com>
> > Signed-off-by: David Rientjes <rientjes@...gle.com>
> 
> Acked-by: Hugh Dickins <hughd@...gle.com>
> 
> Thank you both: a fine example of the danger of uninitialized_var()!

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists