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: <1404156048.5056.5.camel@dhcp-9-2-203-236.watson.ibm.com>
Date:	Mon, 30 Jun 2014 15:20:48 -0400
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	David Howells <dhowells@...hat.com>
Cc:	Dmitry Kasatkin <d.kasatkin@...sung.com>,
	keyrings <keyrings@...ux-nfs.org>,
	linux-security-module <linux-security-module@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Josh Boyer <jwboyer@...hat.com>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Dmitry Kasatkin <dmitry.kasatkin@...il.com>
Subject: Re: [PATCH v6 3/6] KEYS: make partial key id matching as a
 dedicated function

On Mon, 2014-06-30 at 16:14 +0300, Dmitry Kasatkin wrote: 
> On 27/06/14 16:38, David Howells wrote:
> > Mimi Zohar <zohar@...ux.vnet.ibm.com> wrote:
> >
> >> +	if (strncmp(id, "id:", 3) == 0)
> 
> >> Use memcmp() here.
> 
> 'id' function parameter comes from "keys_ownerid" kernel parameter.
> User can supply anything shorter than "id:".
> Though comparing 3 bytes should not produce any memory access errors,
> memcmp can access beyond the length of the string.
> I think 'strcnmp' is more appropriate here...
> 
> 
> >> -	kid += kidlen - idlen;
> >> -	if (strcasecmp(id, kid) != 0)
> >> -		return 0;
> > This test is no longer applied in the "<subtype>:..." case.
> 
> I did not get fully what you comment here or ask to do..
> But yes, with this patch, it is no longer the case.

Other than this comment, all of the other comments have been addressed.
The updated patches are available from
linux-integrity/next-trusted-keys.

thanks,

Mimi

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