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:	Fri, 27 Jul 2012 08:07:16 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Kent Yoder <key@...ux.vnet.ibm.com>
CC:	linux-kernel@...r.kernel.org, tpmdd-devel@...ts.sourceforge.net,
	m.selhorst@...rix.com, safford@...ibm.com
Subject: Re: [PATCH 1/2] tpm: Move tpm_get_random api into the TPM device
 driver

On 07/27/2012 07:49 AM, Kent Yoder wrote:
>>
>>>   	case Opt_new:
>>> -		ret = my_get_random(payload->key, payload->key_len);
>>> +		ret = tpm_get_random(TPM_ANY_NUM, payload->key,
>>> +				     &payload->key_len);
>>
>> payload->key_len is unsigned int, not size_t; this causes an
>> overwrite of blob_len on 64-bit platforms.
>
>    Good catch.
>

It generated a compiler warning, so that one was trivial to spot.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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