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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 9 Mar 2020 22:31:45 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Joe Perches <joe@...ches.com>
Cc:     Daniel Xu <dxu@...uu.xyz>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH] xattr: NULL initialize name in simple_xattr_alloc

On Mon, Mar 09, 2020 at 12:30:07PM -0700, Joe Perches wrote:
> On Mon, 2020-03-09 at 11:37 -0700, Daniel Xu wrote:
> > It's preferable to initialize structs to a deterministic state.
> 
> Thanks Daniel.

Not much point, TBH - there are only two callers, both assigning
that field very shortly.  If you want to do it, do it right -
make that
	simple_xattr_alloc(name, value, len)
with kfree(name) done on failure.  And make the callers allocate
the name first.  Simpler cleanup rules on failure exits that
way...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ