All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Peter Huewe <peterhuewe@gmx.de>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>,
	kernel <kernel@axis.com>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<LinoSanfilippo@gmx.de>
Subject: Re: [PATCH 1/2] tpm: Fix tpmrm reference counting
Date: Thu, 17 Jun 2021 07:38:09 +0200	[thread overview]
Message-ID: <20210617053809.GA4049@axis.com> (raw)
In-Reply-To: <20210616185301.GV1096940@ziepe.ca>

On Wed, Jun 16, 2021 at 08:53:01PM +0200, Jason Gunthorpe wrote:
> On Tue, Jun 15, 2021 at 11:14:08AM +0200, Vincent Whitchurch wrote:
> > The code added by commit 8979b02aaf1d6de8 ("tpm: Fix reference count to
> > main device") tries to take an extra reference to the main device only
> > for TPM2 by looking at the flags, but the flags are actually not set
> > at the time when tpm_chip_alloc() is called, so no extra reference is
> > ever taken, leading to a use-after-free if the TPM modules are removed
> > when the tpmrm device is in use.
> 
> Please read this
> 
> https://lore.kernel.org/linux-integrity/20210205172528.GP4718@ziepe.ca/

Thank you for the pointer.  I see that Lino already posted your proposal
as a real patch as you requested so I will drop this.

 https://lore.kernel.org/linux-integrity/1613949567-1181-2-git-send-email-LinoSanfilippo@gmx.de/

      reply	other threads:[~2021-06-17  5:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  9:14 Vincent Whitchurch
2021-06-15  9:14 ` [PATCH 2/2] tpm: Fix crash on tmprm release Vincent Whitchurch
2021-06-15 13:18   ` Jarkko Sakkinen
2021-06-17  5:44     ` Vincent Whitchurch
2022-03-03  2:03   ` Stefan Berger
2021-06-16 18:53 ` [PATCH 1/2] tpm: Fix tpmrm reference counting Jason Gunthorpe
2021-06-17  5:38   ` Vincent Whitchurch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210617053809.GA4049@axis.com \
    --to=vincent.whitchurch@axis.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=kernel@axis.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stefanb@linux.vnet.ibm.com \
    --subject='Re: [PATCH 1/2] tpm: Fix tpmrm reference counting' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.