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:	Tue, 30 Nov 2010 14:32:00 +0000
From:	David Howells <dhowells@...hat.com>
To:	kjhall@...ibm.com, Serge Hallyn <serge.hallyn@...onical.com>,
	Mimi Zohar <zohar@...ux.vnet.ibm.com>,
	tpmdd-devel@...ts.sourceforge.net
Cc:	dhowells@...hat.com, linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org, keyrings@...ux-nfs.org,
	linux-crypto@...r.kernel.org,
	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	James Morris <jmorris@...ei.org>,
	David Safford <safford@...son.ibm.com>,
	Rajiv Andrade <srajiv@...ux.vnet.ibm.com>
Subject: Re: [PATCH v1.5 3/5] key: add tpm_send command

Serge Hallyn <serge.hallyn@...onical.com> wrote:

> > +int tpm_send(u32 chip_num, void *cmd, size_t buflen)
> 
> Hate to nit-pick, but any particular reason you're not following the
> rest of the file and using 'struct tpm_cmd_t *cmd' here?

Ummm...  Something else I've just noticed...

	static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
					       size_t bufsiz)

would suggest that buf is read-only, but tpm_transit() keeps casting it away,
and especially, casts it away before passing it to chip->vendor.recv()...
This would seem to indicate a logic error somewhere.

Certainly, tpm_atml_recv() modifies the buffer it is given to...

I suspect the argument and reply buffer pointers should be passed separately.

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