From: Theodore Ts'o <tytso@mit.edu>
To: Daniel Micay <danielmicay@gmail.com>
Cc: Laura Abbott <labbott@redhat.com>,
Kees Cook <keescook@chromium.org>,
kernel-hardening@lists.openwall.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline
Date: Thu, 17 Aug 2017 17:44:29 -0400 [thread overview]
Message-ID: <20170817214429.wt7zly2e3bmnlfyp@thunk.org> (raw)
In-Reply-To: <1503003427.1514.6.camel@gmail.com>
On Thu, Aug 17, 2017 at 04:57:07PM -0400, Daniel Micay wrote:
> > I did say 'external attacker' but it could be made clearer.
>
> Er, s/say/mean to imply/
Right, that's why I had suggested modifying the first few lines of the
commit description to read something like this:
Feed the boot command-line as to the /dev/random entropy pool
Existing Android bootloaders usually pass data which may not be known
by an external attacker on the kernel command-line. It may also be
the case on other embedded systems. Sample command-line from a Google
Pixel running CopperheadOS:
(Or something like that.)
> I'll look into having the kernel stash some entropy in pstore soon since
> that seems like it could be a great improvement. I'm not sure how often
> / where it should hook into for regularly refreshing it though. Doing it
> only on powering down isn't ideal.
One thing we could do is to agree on a standard place where the
entropy would be stashed, and then have the kernel remove it from
being visible in /proc/cmdline. That's not a perfect answer, since
the user might be able to look at the command line via other
mechanisms. (For example, on x86, by looking at GRUB while the system
is booting.)
However, an attacker who is merely running code on the local system is
not likely to be gain access to that value --- so it's definitely an
improvement.
Refreshing the entry immediately after boot, and before a clean
shutdown would be ideal from a security perspective. I don't know if
there are write endurance issues with updating the pstore that
frequently, though.
- Ted
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-08-17 21:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 23:14 [PATCHv3 0/2] Command line randomness Laura Abbott
2017-08-16 23:14 ` [PATCHv3 1/2] init: Move stack canary initialization after setup_arch Laura Abbott
2017-08-16 23:14 ` [PATCHv3 2/2] extract early boot entropy from the passed cmdline Laura Abbott
2017-08-16 23:23 ` Kees Cook
2017-08-17 3:31 ` Theodore Ts'o
2017-08-17 4:23 ` Daniel Micay
2017-08-17 20:57 ` Daniel Micay
2017-08-17 21:44 ` Theodore Ts'o [this message]
2017-08-30 9:57 ` Pavel Machek
2017-08-30 13:27 ` [kernel-hardening] " Nick Kralevich
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=20170817214429.wt7zly2e3bmnlfyp@thunk.org \
--to=tytso@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=danielmicay@gmail.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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