From: Jason Gunthorpe <jgg@ziepe.ca>
To: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
Jarkko Sakkinen <jarkko@kernel.org>,
Stefan Berger <stefanb@linux.vnet.ibm.com>,
kernel@axis.com, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] tpm: Fix tpmrm reference counting
Date: Wed, 16 Jun 2021 15:53:01 -0300 [thread overview]
Message-ID: <20210616185301.GV1096940@ziepe.ca> (raw)
In-Reply-To: <20210615091410.17007-1-vincent.whitchurch@axis.com>
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/
Jason
next prev parent reply other threads:[~2021-06-16 18:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 9:14 [PATCH 1/2] tpm: Fix tpmrm reference counting 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 ` Jason Gunthorpe [this message]
2021-06-17 5:38 ` [PATCH 1/2] tpm: Fix tpmrm reference counting Vincent Whitchurch
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=20210616185301.GV1096940@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=jarkko@kernel.org \
--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 \
--cc=vincent.whitchurch@axis.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).