From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-efi@vger.kernel.org, linux-crypto@vger.kernel.org,
patches@lists.linux.dev, linux-kernel@vger.kernel.org,
ardb@kernel.org
Subject: Re: [PATCH v3 1/5] efi: vars: prohibit reading random seed variables
Date: Mon, 28 Nov 2022 02:10:29 +0100 [thread overview]
Message-ID: <Y4QKhRycxam5MIU1@zx2c4.com> (raw)
In-Reply-To: <20221127210040.GA32253@srcf.ucam.org>
Hi,
On Sun, Nov 27, 2022 at 09:00:40PM +0000, Matthew Garrett wrote:
> On Tue, Nov 22, 2022 at 03:04:00AM +0100, Jason A. Donenfeld wrote:
> > In anticipation of putting random seeds in EFI variables, it's important
> > that the random GUID namespace of variables remains hidden from
> > userspace. We accomplish this by not populating efivarfs with entries
> > from that GUID, as well as denying the creation of new ones in that
> > GUID.
>
> What's the concern here? Booting an older kernel would allow a malicious
> actor to either read the seed variable or set it to a value under their
> control, so we can't guarantee that the information is secret.
The security model is the same as that of random seed files, on, say,
BSD. If you remove the hard drive or change the operating system or what
have you, then sure, you can fiddle with the seed and read it. But the
running operating system shouldn't show it to you if it can help it.
Consider, for example, systemd's use of EFI variables for the
SystemToken. There, they have PID 1 take care of chmod'ing it before
other processes start. But of course a different OS or even EFI shell
could just read it. So, think of this as just basic runtime safety --
like what people do when they set the umask before writing a random seed
file -- rather than some type of ultimate secrecy.
(And either way, the larger picture is that it's much more important to
get as much random data from as many sources as possible as soon as
possible, rather than being overly paranoid about every one single
source that we start excluding sources. A plethora of sources is better
off here.)
Jason
next prev parent reply other threads:[~2022-11-28 1:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 2:03 [PATCH v3 0/5] Use EFI variables for random seed Jason A. Donenfeld
2022-11-22 2:04 ` [PATCH v3 1/5] efi: vars: prohibit reading random seed variables Jason A. Donenfeld
2022-11-27 21:00 ` Matthew Garrett
2022-11-28 1:10 ` Jason A. Donenfeld [this message]
2022-11-22 2:04 ` [PATCH v3 2/5] efi: stub: use random seed from EFI variable Jason A. Donenfeld
2022-11-27 21:12 ` Matthew Garrett
2022-11-28 1:12 ` Jason A. Donenfeld
2022-11-28 1:35 ` Matthew Garrett
2022-11-22 2:04 ` [PATCH v3 3/5] random: add back async readiness notifier Jason A. Donenfeld
2022-11-22 2:04 ` [PATCH v3 4/5] vsprintf: initialize siphash key using notifier Jason A. Donenfeld
2022-11-22 2:04 ` [PATCH v3 5/5] efi: random: refresh non-volatile random seed when RNG is initialized Jason A. Donenfeld
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=Y4QKhRycxam5MIU1@zx2c4.com \
--to=jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=patches@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox