From: Pavel Machek Subject: Re: [PATCH 0/4][RFC v2] Introduce the in-kernel hibernation encryption Date: Wed, 8 Aug 2018 19:50:36 +0200 Message-ID: <20180808175036.GA16217@amd> References: <1532346156.3057.11.camel@suse.com> <20180723162302.GA4503@sandybridge-desktop> <1532590246.7411.3.camel@suse.com> <20180726081404.GG4244@linux-l9pv.suse> <20180730170415.GQ4244@linux-l9pv.suse> <20180803033702.GB416@sandybridge-desktop> <20180803053445.GC4244@linux-l9pv.suse> <20180805100200.GB22948@amd> <20180806084534.GB12124@chenyu-desktop> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Cc: Ryan Chen , jlee@suse.com, oneukum@suse.com, "Rafael J. Wysocki" , ebiggers@google.com, Theodore Ts'o , smueller@chronox.de, denkenz@gmail.com, Linux PM list , linux-crypto@vger.kernel.org, Linux Kernel Mailing List , kookoo.gu@intel.com, Zhang Rui To: Yu Chen Return-path: Content-Disposition: inline In-Reply-To: <20180806084534.GB12124@chenyu-desktop> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > > User space doesn't need to involve. The EFI root key is generated by > > > > EFI boot stub and be transfer to kernel. It's stored in EFI boot se= rvice > > > > variable that it can only be accessed by trusted EFI binary when > > > > secure boot is enabled. > > > > > > > Okay, this apply to the 'suspend' phase, right? > > > I'm still a little confused about the 'resume' phase. > > > Taking encryption as example(not signature), > > > the purpose of doing hibernation encryption is to prevent other users > > > from stealing ram content. Say, user A uses a passphrase to generate= the > >=20 > > No, I don't think that's purpose here. > >=20 > > Purpose here is to prevent user from reading/modifying kernel memory > > content on machine he owns. > > > Say, A puts his laptop into hibernation and walks away, > and B walks by, and opens A's laptop and wakes up the system and he > can do what he wants. Although EFI key/TPM trusted key is enabled, > currently there's no certification during resume, which sounds > unsafe to me. Afterall, the original requirement is to probe Define unsafe. If you want security against bad people resuming your machines, please take a look at existing uswsusp solutions. It defends against that. If you want security against bad people tampering with your machines physically, sorry, there's no way to defend against that. But I thought you were trying to do something for secure boot, and "bad person resumes your machine" is out of scope there. So please always explain security against _what kind of attack_ you are trying to improve; intelligent communication is not possible without that. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltrLWwACgkQMOfwapXb+vJriwCeMEH0FxLppyjbtaP2vkRpY8NQ jOwAnjWz691CHnHSi4qRKDxI5a2mGXq+ =Rbr4 -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm--