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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f77c0e8b481fd813b3a76b84d33d8db62e235f7.camel@linux.ibm.com>
Date: Thu, 07 Nov 2024 09:00:01 -0500
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Jarkko Sakkinen <jarkko@...nel.org>, linux-integrity@...r.kernel.org,
        Jonathan Corbet <corbet@....net>, Peter Huewe <peterhuewe@....de>,
        Jason
 Gunthorpe <jgg@...pe.ca>,
        James Bottomley
 <James.Bottomley@...senPartnership.com>
Cc: Roberto Sassu <roberto.sassu@...wei.com>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tpm: Opt-in in disable PCR integrity protection

On Thu, 2024-11-07 at 15:47 +0200, Jarkko Sakkinen wrote:
> On Thu Nov 7, 2024 at 3:44 PM EET, Mimi Zohar wrote:
> > > 
> > > @@ -232,18 +236,26 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
> > >  	int rc;
> > >  	int i;
> > >  
> > > -	rc = tpm2_start_auth_session(chip);
> > > -	if (rc)
> > > -		return rc;
> > > +	if (!disable_pcr_integrity_protection) {
> > > +		rc = tpm2_start_auth_session(chip);
> > > +		if (rc)
> > > +			return rc;
> > > +	}
> > >  
> > >  	rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_PCR_EXTEND);
> > >  	if (rc) {
> > > -		tpm2_end_auth_session(chip);
> > > +		if (!disable_pcr_integrity_protection)
> > > +			tpm2_end_auth_session(chip);
> > >  		return rc;
> > >  	}
> > >  
> > > -	tpm_buf_append_name(chip, &buf, pcr_idx, NULL);
> > > -	tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
> > > +	if (!disable_pcr_integrity_protection) {
> > > +		tpm_buf_append_name(chip, &buf, pcr_idx);
> > 
> > tpm_buf_append_name() parameters didn't change.  Don't remove the 'name' field
> > here.
> 
> Hmm... weird I'll check this. Maybe I had something left to staging...
> 
> > 
> > 
> > > +		tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
> > > +	} else {
> > > +		tpm_buf_append_handle(chip, &buf, pcr_idx);
> > 
> 
> > Or here.
> 
> Here I think it is appropriate

Agreed

> 
> > 
> > > +		tpm_buf_append_auth(chip, &buf, 0, NULL, 0);
> > > +	}
> > >  
> > >  	tpm_buf_append_u32(&buf, chip->nr_allocated_banks);
> > > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ