From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH 1/5 v2] PM / hibernate: Create snapshot keys handler Date: Wed, 9 Jan 2019 23:19:28 +0100 Message-ID: <20190109221928.GA32688@amd> References: <20190108050358.llsox32hggn2jioe@gondor.apana.org.au> <1565399.7ulKdI1fm5@tauon.chronox.de> <1546994671.6077.10.camel@HansenPartnership.com> <1547016579.2789.17.camel@HansenPartnership.com> <1547063189.2879.47.camel@HansenPartnership.com> <1547070220.2758.4.camel@HansenPartnership.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Return-path: Content-Disposition: inline In-Reply-To: <1547070220.2758.4.camel@HansenPartnership.com> Sender: linux-kernel-owner@vger.kernel.org To: James Bottomley Cc: Andy Lutomirski , Jarkko Sakkinen , Stephan Mueller , Herbert Xu , "Lee, Chun-Yi" , "Rafael J . Wysocki" , LKML , linux-pm@vger.kernel.org, keyrings@vger.kernel.org, "Rafael J. Wysocki" , Chen Yu , Oliver Neukum , Ryan Chen , David Howells , Giovanni Gherdovich , Randy Dunlap , Jann Horn List-Id: linux-pm@vger.kernel.org --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > Note if someone has your laptop and the ability to boot their own > > > kernels, they could always corrupt the kernel into decrypting the > > > image or giving you the unsealed key, but there's no real way of > > > preventing that even with PCR sealing or lockdown, so the basis for > > > the threat model is very much my laptop in my possession running my > > > kernel. > >=20 > > I'm not entirely sure I agree. With a TPM-aware bootloader, it > > really ought to be possible to seal to PCRs such that a corrupted > > kernel can't restore the image. Obviously a *compromised* but > > otherwise valid kernel will be able to restore the image. >=20 > It is possible to seal the key so that only the same booted kernel can > restore the image, yes. One of the measurements that goes into the > boot log is the hash of the kernel and you can seal to this value ... > obviously if you upgrade your kernel RPM (or shim or grub) this value > changes and you'd lose the ability to restore the hibernated image, but > since the image is very kernel specific, that's probably OK. Non-ancient kernels actually support hibernation by one kernel and restore by another one. But yes, normally it is same kernel binary doing hibernation and restore. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlw2c3AACgkQMOfwapXb+vJsLQCfQpFcrOhA1gXr6iyY8t2KD3C7 e9wAnR2l05dQ/Z/mafMvvKDMZM5JLHog =KQIG -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs--