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: <e6675b5f26606997c6ac9ce2fb411e474a09fdce.camel@kernel.org>
Date: Wed, 17 Jul 2024 12:34:26 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: James Bottomley <James.Bottomley@...senPartnership.com>, 
	linux-integrity@...r.kernel.org
Cc: stable@...r.kernel.org, Mimi Zohar <zohar@...ux.ibm.com>, David Howells
	 <dhowells@...hat.com>, Paul Moore <paul@...l-moore.com>, James Morris
	 <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>, 
	keyrings@...r.kernel.org, linux-security-module@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] tpm: Relocate buf->handles to appropriate place

On Wed, 2024-07-17 at 12:31 +0300, Jarkko Sakkinen wrote:
> On Wed, 2024-07-17 at 12:27 +0300, Jarkko Sakkinen wrote:
> > On Tue, 2024-07-16 at 15:32 -0400, James Bottomley wrote:
> > > On Tue, 2024-07-16 at 21:52 +0300, Jarkko Sakkinen wrote:
> > > [...]
> > > > Further, 'handles' was incorrectly place to struct tpm_buf, as tpm-
> > > > buf.c does manage its state. It is easy to grep that only piece of
> > > > code that actually uses the field is tpm2-sessions.c.
> > > > 
> > > > Address the issues by moving the variable to struct tpm_chip.
> > > 
> > > That's really not a good idea, you should keep counts local to the
> > > structures they're counting, not elsewhere.
> > > 
> > > tpm_buf->handles counts the number of handles present in the command
> > > encoded in a particular tpm_buf.  Right at the moment we only ever
> > > construct one tpm_buf per tpm (i.e. per tpm_chip) at any one time, so
> > > you can get away with moving handles into tpm_chip.  If we ever
> > > constructed more than one tpm_buf per chip, the handles count would
> > > become corrupted.
> > 
> > It is not an idea. That count is in the wrong place. Buffer code
> > has no use for it.
> 
> Also you are misleading here again. Depending on context tpm_buf
> stores different data, including handles.

These false claims can be also proved wrong by trivial git grep,
which clearly shows its scope.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ