All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>,
	"Kenneth R. Crudup" <kenny@panix.com>,
	Tyler Hicks <tyhicks@linux.microsoft.com>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Matthew Garrett <mjg59@google.com>,
	tweek@google.com
Subject: Re: [Regression] "tpm: Require that all digests are present in TCG_PCR_EVENT2 structures" causes null pointer dereference
Date: Mon, 28 Sep 2020 20:12:39 +0300	[thread overview]
Message-ID: <20200928171238.GB119268@linux.intel.com> (raw)
In-Reply-To: <CAMj1kXF-hOTZ62_Tf_GAN9_w7ztngdVp_atNrowH5Y0SwSjCAw@mail.gmail.com>

On Mon, Sep 28, 2020 at 06:15:00PM +0200, Ard Biesheuvel wrote:
> > > > It is possible but initially feels a bit weird:
> > > >
> > > > -                  sizeof(TCG_SPECID_SIG)) || count > efispecid->num_algs) {
> > > > +                  sizeof(TCG_SPECID_SIG)) ||
> > > > +           !efispecid->num_algs || count != efispecid->num_algs) {

^^^

> In tpm2_bios_measurements_start(), we dereference tpm_bios_log to
> access bios_event_log and bios_event_log_end without checking tpm_bios
> for NULL. This is where the crash seems to occur.

That's a good guess. Just a bit confused how that particular patch can
have the effect: it has two deferences to efispecid instead of one in
the same statement. Would be interesting to hear if the bug is triggered
in Kenneth's environment by the exact same commit.

/Jarkko

  parent reply	other threads:[~2020-09-28 17:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 12:31 [Regression] "tpm: Require that all digests are present in TCG_PCR_EVENT2 structures" causes null pointer dereference Kai-Heng Feng
2020-09-28 14:06 ` Jarkko Sakkinen
2020-09-28 14:16   ` Kai-Heng Feng
     [not found]     ` <20200928155215.GA92669@linux.intel.com>
2020-09-28 16:15       ` Ard Biesheuvel
2020-09-28 16:26         ` Ard Biesheuvel
2020-09-28 17:12         ` Jarkko Sakkinen [this message]
2020-09-28 18:05           ` Kenneth R. Crudup
2020-09-29 17:52     ` Mimi Zohar
2020-09-30  2:20       ` Jarkko Sakkinen
2020-10-08  9:09         ` Kai-Heng Feng
2020-10-09 16:06           ` Jarkko Sakkinen
2020-10-13 14:31             ` Tyler Hicks
2020-10-13 14:33               ` Jarkko Sakkinen
2020-10-20 21:07       ` Mimi Zohar
2020-10-21  5:48         ` Tyler Hicks
2020-10-26  5:49           ` Kai-Heng Feng
2020-10-27  5:08             ` Tyler Hicks
2020-10-28 15:41 ` [PATCH] tpm: efi: Don't create binary_bios_measurements file for an empty log Tyler Hicks
2020-10-28 16:30   ` Tyler Hicks
2020-10-28 17:39     ` Tyler Hicks
2020-10-30  6:41       ` Kai-Heng Feng
2020-11-04  2:12       ` Kenneth R. Crudup
2020-10-30  4:46   ` Jarkko Sakkinen

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=20200928171238.GB119268@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=ardb@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=kenny@panix.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@google.com \
    --cc=tweek@google.com \
    --cc=tyhicks@linux.microsoft.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 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.