All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org, monty.wiseman@ge.com,
	Monty Wiseman <montywiseman32@gmail.com>,
	Matthew Garrett <mjg59@google.com>
Subject: Re: Documenting the proposal for TPM 2.0 security in the face of bus interposer attacks
Date: Wed, 21 Nov 2018 09:18:19 +0200	[thread overview]
Message-ID: <20181121071819.GD3640@linux.intel.com> (raw)
In-Reply-To: <20181121054201.GB17002@ziepe.ca>

On Tue, Nov 20, 2018 at 10:42:01PM -0700, Jason Gunthorpe wrote:
> > Why you wouldn't use DMA to spy the RAM?
> 
> The platform has to use IOMMU to prevent improper DMA access from
> places like PCI-E slots if you are using measured boot and want to
> defend against HW tampering.

Yes. This is what I wanted to point out. Windows 10 has VBS to
achieve something like this.

https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-vbs

> The BIOS has to sequence things so that at least pluggable PCI-E slots
> cannot do DMA until the IOMMU is enabled.

Yep.

> Honestly not sure if we do this all correctly in Linux, or if BIOS
> vendors even implemented this level of protection. The BIOS would have
> to leave the PCI-E root port slots disabled, and configure the ports
> to reject config TLPs from the hostile PCI-E device, and probably a
> big bunch of other stuff.. Then Linux would have to enable the IOMMU
> and then enable the PCI-E ports for operation.

Linux should have something like VBS. Like James' proposal it does not
solve the puzzle but is one step forward...

> Pretty subtle and tricky stuff.
> 
> Without IOMMU it would be trivial to plug a card in an open PCI-E slot
> (or M.2 slot on a laptop) and breach all measured boot guarantees via
> DMA. For instance, if IOMMU is not enabled during grub then I could
> overwrite the trusted grub with DMA and cleverly make it jump to my
> hostile code, then I can replay PCR extends to the TPM and
> seal/unseal/attest using the PCRs set to a trusted sytem when running
> hostile code. Oopsie.
> 
> This is a much easier attack than inserting a TPM interposer or
> messing with the TPM reset line...
> 
> But again, measured boot does not protect against HW tampering, so
> this is probably not included in the threat model the BIOS uses...

/Jarkko

  reply	other threads:[~2018-11-21  7:18 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 17:34 Documenting the proposal for TPM 2.0 security in the face of bus interposer attacks James Bottomley
2018-11-19 20:05 ` Jason Gunthorpe
2018-11-19 20:20   ` James Bottomley
2018-11-19 21:19     ` Jason Gunthorpe
2018-11-19 21:34       ` James Bottomley
2018-11-19 21:44         ` Jason Gunthorpe
2018-11-19 22:36           ` James Bottomley
2018-11-19 23:08             ` Jason Gunthorpe
2018-11-20  0:54               ` James Bottomley
2018-11-20  3:05                 ` Jason Gunthorpe
2018-11-20 17:17                   ` James Bottomley
2018-11-20 21:33                     ` Jason Gunthorpe
2018-11-20 22:34                       ` James Bottomley
2018-11-20 23:39                         ` Jason Gunthorpe
2018-11-21  2:24                           ` EXTERNAL: " Jeremy Boone
2018-11-21  5:16                             ` Jason Gunthorpe
2018-11-20 23:52                       ` Jarkko Sakkinen
2018-11-20 23:41                     ` Jarkko Sakkinen
2018-11-20 11:10 ` Jarkko Sakkinen
2018-11-20 12:41   ` Jarkko Sakkinen
2018-11-20 17:25     ` James Bottomley
2018-11-20 23:13       ` Jarkko Sakkinen
2018-11-20 23:58         ` James Bottomley
2018-11-21  0:33           ` EXTERNAL: " Jeremy Boone
2018-11-21  6:37           ` Jarkko Sakkinen
2018-11-21  5:42         ` Jason Gunthorpe
2018-11-21  7:18           ` Jarkko Sakkinen [this message]
     [not found]             ` <F10185EF-C618-45DC-B1F3-0053B8FE417F@gmail.com>
2018-11-21  9:07               ` Jarkko Sakkinen
2018-11-21  9:14             ` Jarkko Sakkinen
2018-11-20 17:23   ` James Bottomley
2018-11-20 23:12     ` Jarkko Sakkinen
2018-12-10 16:33 ` Ken Goldman
2018-12-10 17:30   ` James Bottomley
2018-12-11 21:47     ` Ken Goldman

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=20181121071819.GD3640@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mjg59@google.com \
    --cc=monty.wiseman@ge.com \
    --cc=montywiseman32@gmail.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.