All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Meissner <meissner@suse.de>
To: kernel-hardening@lists.openwall.com
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	Theodore Tso <tytso@google.com>, Emese Revfy <re.emese@gmail.com>,
	Kees Cook <keescook@chromium.org>,
	PaX Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	Greg KH <gregkh@linuxfoundation.org>,
	Josh Triplett <josh@joshtriplett.org>
Subject: Re: [kernel-hardening] Re: Proposal for kernel self protection features
Date: Tue, 10 Nov 2015 11:47:47 +0100	[thread overview]
Message-ID: <20151110104747.GG25737@suse.de> (raw)
In-Reply-To: <1447152151.29239.0.camel@debian.org>

On Tue, Nov 10, 2015 at 11:42:31AM +0100, Yves-Alexis Perez wrote:
> On lun., 2015-11-09 at 21:13 +0000, Matthew Garrett wrote:
> > On Mon, Nov 09, 2015 at 09:09:22PM +0000, Jason Cooper wrote:
> > 
> > > Well, That's why I referred to reading from /boot or from a flash
> > > partition.  Existing bootloaders in the field already have that
> > > capability.  That's how they load the kernel.
> > 
> > This doesn't really handle cases like network booting. Most SoCs have 
> > some kind of RNG, recent x86 has hardware RNG, older x86 frequently has 
> > an RNG in a TPM. Pulling an entropy seed from the filesystem is a 
> > reasonable fallback, but we should definitely be thinking of it as a 
> > fallback - someone with physical access to your system while it's turned 
> > off may be able to infer the ASLR state for your next boot, for 
> > instance.
> 
> About the TPM RNG: I was definitely interested in the “get entropy from
> TPM” kind of thing for my laptop (even though I think my laptop would
> not be the worst place to find entropy). Right now I'm using rng-tools
> to read from /dev/hwrng (handled by tpm_rng module), which then feeds
> entropy to /dev/random (or maybe directly using the RND ioctls).
> 
> Do you think bypassing userland completely in order to be able to feed
> that entropy even before userland is completely initialized would be
> helpful?

The kernel has infrastructure for this (feeding hardware random generators
into the random pool) these days.

e.g.
drivers/char/hw_random/tpm-rng.c

How "good" the generator is is determined by  the "quality" member of
the hwrng struct.

(It seems only virtio-rng.c sets one, but more of them could be reviewed
and used.)

Ciao, Marcus

  reply	other threads:[~2015-11-10 10:47 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 22:55 [kernel-hardening] Proposal for kernel self protection features Emese Revfy
2015-11-06 23:30 ` [kernel-hardening] " Kees Cook
2015-11-07  0:25   ` Josh Triplett
2015-11-07  2:46     ` Greg KH
2015-11-07  4:16       ` Kees Cook
2015-11-07  5:42         ` Josh Triplett
2015-11-07 22:07           ` Emese Revfy
2015-11-08  8:21             ` Josh Triplett
2015-11-08 11:28               ` Emese Revfy
2015-11-08  9:27           ` Alyssa Milburn
2015-11-08 14:09             ` PaX Team
2015-11-07 21:58       ` Emese Revfy
2015-11-08  9:58         ` David Sterba
2015-11-08 17:15         ` Greg KH
2015-11-07 12:41     ` Ard Biesheuvel
2015-11-08 10:09       ` Mathias Krause
2015-11-07 21:42     ` Emese Revfy
2015-11-08  8:37       ` Josh Triplett
2015-11-07 21:34   ` Emese Revfy
2015-11-08  6:40     ` Kees Cook
2015-11-11 13:32     ` Paolo Bonzini
2015-11-12 12:22       ` PaX Team
2015-11-12 12:36         ` Paolo Bonzini
2015-11-13  2:08           ` Emese Revfy
2015-11-08 13:13   ` PaX Team
2015-11-09 18:07     ` Laura Abbott
2015-11-09 18:28       ` Jason Cooper
2015-11-09 18:33         ` Jason Cooper
2015-11-09 18:57         ` Valdis.Kletnieks
2015-11-09 19:02           ` Jason Cooper
2015-11-09 19:11             ` Theodore Tso
2015-11-09 20:06               ` Josh Triplett
2015-11-09 21:07                 ` Jason Cooper
2015-11-09 21:09               ` Jason Cooper
2015-11-09 21:13                 ` Matthew Garrett
2015-11-10 10:42                   ` Yves-Alexis Perez
2015-11-10 10:47                     ` Marcus Meissner [this message]
2015-11-10 11:24                       ` Yves-Alexis Perez
2015-11-09 18:32       ` Theodore Tso
2015-11-11  3:41       ` PaX Team
2015-11-09 21:52     ` Kees Cook
2015-11-09 23:09       ` PaX Team
2016-01-19 18:11 ` Kees Cook
2016-01-19 21:20   ` Emese Revfy
2016-01-19 23:08     ` Kees Cook

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=20151110104747.GG25737@suse.de \
    --to=meissner@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=pageexec@freemail.hu \
    --cc=re.emese@gmail.com \
    --cc=spender@grsecurity.net \
    --cc=tytso@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.