stubdom/grub: verify vTPM label if requested
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Mon, 21 Apr 2014 17:23:04 +0000 (13:23 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 23 Apr 2014 10:58:15 +0000 (11:58 +0100)
commit331d4b0eb8beb0af9c022de50cbf341e70c7ac80
tree2db30201f38d63713ad2f24a5bad687e6a3c6f0d
parentf00b68e706c052002fbcbe820f434f1f1afb725d
stubdom/grub: verify vTPM label if requested

This adds an optional argument --vtpm-label=<label> to the pv-grub
command line.  If specified, a vtpm device must be connected to the
pv-grub domain and the backend of this device must have the given XSM
label (which may start with a * to indicate a wildcard).  Verifying the
label of the vTPM before sending measurements prevents a disaggregated
control domain that has access to xenstore but not to the guest domains
from causing the measurements performed by pv-grub to be discarded,
allowing the forgery of arbitrary kernel measurements in the TPM.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
stubdom/grub/kexec.c
stubdom/grub/mini-os.c
stubdom/grub/mini-os.h