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]
Message-ID: <4067.1272985037@redhat.com>
Date:	Tue, 04 May 2010 15:57:17 +0100
From:	David Howells <dhowells@...hat.com>
To:	"Serge E. Hallyn" <serue@...ibm.com>
Cc:	dhowells@...hat.com, lkml <linux-kernel@...r.kernel.org>,
	Ashwin Ganti <ashwin.ganti@...il.com>,
	Greg KH <greg@...ah.com>, rsc@...ch.com, ericvh@...il.com,
	linux-security-module@...r.kernel.org,
	Ron Minnich <rminnich@...il.com>, jt.beard@...il.com,
	Andrew Morgan <morgan@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Eric Paris <eparis@...hat.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Randy Dunlap <rdunlap@...otime.net>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Kyle Moffett <kyle@...fetthome.net>,
	Steve Grubb <sgrubb@...hat.com>
Subject: Re: [PATCH 3/3] RFC: p9auth: add p9auth fs

Serge E. Hallyn <serue@...ibm.com> wrote:

> +	result = kzalloc(MAX_DIGEST_SIZE, GFP_KERNEL);
> ...
> +	ret = crypto_hash_digest(&desc, &sg, plain_text_size, result);

Does result have to be pre-cleared?

> +	user_buf = kzalloc(count+1, GFP_KERNEL);
> +	if (!user_buf)
> +		goto out;
> +
> +	if (copy_from_user(user_buf, buffer, count)) {

user_buf doesn't need preclearing.  It's just a waste of time.  This occurs
three times.

David
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ