Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714405

Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline

From Theodore Ts'o <tytso@mit.edu>
Newsgroups linux.kernel
Subject Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline
Date 2017-08-17 23:50 +0200
Message-ID <ufAPT-2ew-3@gated-at.bofh.it> (permalink)
References <uffLr-4Z5-1@gated-at.bofh.it> <uffLr-4Z5-5@gated-at.bofh.it> <ufjP4-7vK-25@gated-at.bofh.it> <ufkBr-85g-3@gated-at.bofh.it> <ufA3w-1Eh-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv3 0/2] Command line randomness Laura Abbott <labbott@redhat.com> - 2017-08-17 01:20 +0200
  [PATCHv3 2/2] extract early boot entropy from the passed cmdline Laura Abbott <labbott@redhat.com> - 2017-08-17 01:20 +0200
    Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline Kees Cook <keescook@chromium.org> - 2017-08-17 01:30 +0200
    Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline Theodore Ts'o <tytso@mit.edu> - 2017-08-17 05:40 +0200
      Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline Daniel Micay <danielmicay@gmail.com> - 2017-08-17 06:30 +0200
        Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline Daniel Micay <danielmicay@gmail.com> - 2017-08-17 23:00 +0200
          Re: [PATCHv3 2/2] extract early boot entropy from the passed cmdline Theodore Ts'o <tytso@mit.edu> - 2017-08-17 23:50 +0200
  [PATCHv3 1/2] init: Move stack canary initialization after setup_arch Laura Abbott <labbott@redhat.com> - 2017-08-17 01:20 +0200

csiph-web