From: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Petr Vandrovec <petr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 4/4] Improve handling of TPM2 event logs
Date: Thu, 6 Apr 2017 09:35:34 +0300 [thread overview]
Message-ID: <20170406063534.nw33ck7gek7g4vur@intel.com> (raw)
In-Reply-To: <58E553A9.8010804-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
On Wed, Apr 05, 2017 at 01:29:29PM -0700, Petr Vandrovec wrote:
> Jarkko Sakkinen wrote:
> > On Wed, Mar 29, 2017 at 12:43:30AM -0700, Petr Vandrovec wrote:
> > > From: Petr Vandrovec<petr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
> > >
> > > When TPM2 log has entries with more than 3 digests, or with digests
> > > not listed in the log header, log gets misparsed, eventually
> > > leading to kernel complaint that code tried to vmalloc 512MB of
> > > memory (I have no idea what would happen on bigger system).
> >
> > It would be easier to follow this if you would give a concrete
> > example of such situation. Since you are contributing this, you
> > must must have bumped into this, haven't you?
>
> Yes. Our firmware reports TPM2 log with 4 digests (SHA1, SHA256, SHA384,
> SHA512). Current code in kernel skips over first 3 digests only, trying to
> parse 4th digest as event length, coming to conclusion that entry is hundred
> of megabytes or few gigabytes long, and then failing to vmalloc() that
> amount of memory.
>
> You can find parsed textual log at
> https://drive.google.com/open?id=0B7WL11GSMhrQRDBLWjc3bEZQTEk (192KB), and
> binary log at https://drive.google.com/open?id=0B7WL11GSMhrQQ1RCMmRmM2paR3c
> (48KB).
>
> I hit situation with malformed event log on my Dell laptop - after TPM
> firmware got updated from 1.2 to 2.0, chip & everything is reported as TPM2,
> except that log stays in TPM1.2 format.
Great thank you. I think I'll merge this already to my master branch
(not yet the whole series). Thanks a lot for spotting and fixing this
regression.
/Jarkko
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2017-04-06 6:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 7:43 [PATCH 4/4] Improve handling of TPM2 event logs Petr Vandrovec
[not found] ` <20170329074330.b2rbsbt2zc7o22q7-WbvboCQVrrgDIl+Cyo8nDyLysJ1jNyTM@public.gmane.org>
2017-04-05 11:46 ` Jarkko Sakkinen
[not found] ` <20170405114650.c2kkkz2th2emalcc-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-05 20:29 ` Petr Vandrovec
[not found] ` <58E553A9.8010804-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2017-04-06 6:35 ` Jarkko Sakkinen [this message]
[not found] ` <20170406063534.nw33ck7gek7g4vur-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-06 6:44 ` Jarkko Sakkinen
[not found] ` <20170406064454.mwb52hnl54tqxss2-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-06 6:45 ` 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=20170406063534.nw33ck7gek7g4vur@intel.com \
--to=jarkko.sakkinen-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=petr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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).