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


Groups > linux.kernel > #1660041

Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using
Date 2017-06-07 19:40 +0200
Message-ID <tPN61-1bu-5@gated-at.bofh.it> (permalink)
References (2 earlier) <tPd2y-3dl-3@gated-at.bofh.it> <tPdOV-3t1-1@gated-at.bofh.it> <tPeBj-42I-5@gated-at.bofh.it> <tPlWb-lw-57@gated-at.bofh.it> <tPq9t-3eA-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 06, 2017 at 01:03:19PM -0400, Theodore Ts'o wrote:
> The other approach is to find a way to have initialized "seed" entropy
> which we can count on at every boot.  The problem is that this is very
> much dependent on how the bootloader works.  It's easy to say "store
> it in the kernel", but where the kernel is stored varies greatly from
> architecture to architecture.  In some cases, the kernel can stored in
> ROM, where it can't be modified at all.
> 
> It might be possible, for example, to store a cryptographic key in a
> UEFI boot-services variable, where the key becomes inaccessible after
> the boot-time services terminate.  But you also need either a reliable
> time-of-day clock, or a reliable counter which is incremented each
> time the system that boots, and which can't be messed with by an
> attacker, or trivially reset by a clueless user/sysadmin.

FWIW, EFI has an (optional) EFI_RNG_PROTOCOL, that we currently use to
seed the kernel's entropy pool. The EFI stub creates a config table with
the entropy, which the kernel reads.

This is re-seeded prior to kexec() to avoid the entropy being recycled.

See commits:

636259880a7e7d34 ("efi: Add support for seeding the RNG from a UEFI config table")
568bc4e87033d232 (" efi/arm*/libstub: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table")

Unfortunately, I beleive that support for the protocol is currently rare
in practice.

Thanks,
Mark.

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


Thread

[PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 03:00 +0200
  Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before  using Theodore Ts'o <tytso@mit.edu> - 2017-06-06 05:10 +0200
    Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 06:00 +0200
      Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Eric Biggers <ebiggers3@gmail.com> - 2017-06-06 06:50 +0200
        Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 14:40 +0200
          Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 17:30 +0200
            Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Eric Biggers <ebiggers3@gmail.com> - 2017-06-06 19:30 +0200
              Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 19:40 +0200
          Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Theodore Ts'o <tytso@mit.edu> - 2017-06-06 19:10 +0200
            Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 19:30 +0200
            Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using Stephan Müller <smueller@chronox.de> - 2017-06-06 20:00 +0200
              Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-06-06 20:10 +0200
            Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2017-06-07 00:20 +0200
              Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Theodore Ts'o <tytso@mit.edu> - 2017-06-07 01:20 +0200
              Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using Stephan Müller <smueller@chronox.de> - 2017-06-07 07:10 +0200
                Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2017-06-07 16:50 +0200
                Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Theodore Ts'o <tytso@mit.edu> - 2017-06-07 23:30 +0200
              Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Daniel Micay <danielmicay@gmail.com> - 2017-06-07 19:10 +0200
                Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Mark Rutland <mark.rutland@arm.com> - 2017-06-07 19:30 +0200
                Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Daniel Micay <danielmicay@gmail.com> - 2017-06-08 06:00 +0200
            Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that  the RNG is ready before using Mark Rutland <mark.rutland@arm.com> - 2017-06-07 19:40 +0200
      Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before  using Kevin Easton <kevin@guarana.org> - 2017-06-08 14:10 +0200

csiph-web