[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE=gft65bdcoU-oF1=QK2Pg1-kO5gSXk7jxa99fErHK3osytCQ@mail.gmail.com>
Date: Tue, 20 Sep 2022 09:39:25 -0700
From: Evan Green <evgreen@...omium.org>
To: Pavel Machek <pavel@....cz>
Cc: LKML <linux-kernel@...r.kernel.org>,
Gwendal Grignou <gwendal@...omium.org>,
Eric Biggers <ebiggers@...nel.org>,
Matthew Garrett <mgarrett@...ora.tech>,
Jarkko Sakkinen <jarkko@...nel.org>,
Mimi Zohar <zohar@...ux.ibm.com>,
linux-integrity@...r.kernel.org, apronin@...omium.org,
Daniil Lunev <dlunev@...gle.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux PM <linux-pm@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
David Howells <dhowells@...hat.com>,
Hao Wu <hao.wu@...rik.com>, James Morris <jmorris@...ei.org>,
Jason Gunthorpe <jgg@...pe.ca>,
Len Brown <len.brown@...el.com>,
Paul Moore <paul@...l-moore.com>,
Peter Huewe <peterhuewe@....de>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"Serge E. Hallyn" <serge@...lyn.com>, axelj <axelj@...s.com>,
keyrings@...r.kernel.org,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
linux-security-module@...r.kernel.org,
Jorge Lucangeli Obes <jorgelo@...gle.com>
Subject: Re: [PATCH v2 00/10] Encrypted Hibernation
On Tue, Sep 20, 2022 at 1:46 AM Pavel Machek <pavel@....cz> wrote:
>
> Hi!
>
> > We are exploring enabling hibernation in some new scenarios. However,
> > our security team has a few requirements, listed below:
> > 1. The hibernate image must be encrypted with protection derived from
> > both the platform (eg TPM) and user authentication data (eg
> > password).
> > 2. Hibernation must not be a vector by which a malicious userspace can
> > escalate to the kernel.
>
> Why is #2 reasonable requirement?
>
> We normally allow userspace with appropriate permissions to update the
> kernel, for example.
I'll take a stab at answering this. I've also CCed one of our security
folks to keep me honest and add any needed additional context.
ChromeOS takes an approach of attempting to limit the blast radius of
any given vulnerability as much as possible. A vulnerable system
service may be running as root, but may also still be fairly
constrained by sandboxing: it may not have access to all processes,
the entire file system, or all capability bits. With Verified Boot
[1], our kernel and rootfs are statically signed by Google (or
yourself if firmware has been reflashed). Even if a full root
compromise occurs, it's difficult for the attacker to persist across a
reboot, since they cannot update the kernel or init flow on disk
without the signing key.
We do our best to lock down other escalation vectors from root to
kernel as well. For instance, features like LoadPin help prevent a
malicious root from simply loading up a payload via insmod.
So in cases like ours, jumping from root execution to kernel execution
represents a real escalation in privilege. Hibernate as it exists
today represents a wide open door for root to become kernel, so we're
forced to disable the Kconfigs for it. This series, along with another
patch to restrict unencrypted resume, would add the guardrails we need
to prevent arbitrary code from moving into the kernel via resume.
-Evan
[1] https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot/
Powered by blists - more mailing lists