From: Thorsten Glaser <tg@mirbsd.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Stephan Mueller" <smueller@chronox.de>,
"J�rn Engel" <joern@logfs.org>,
"Linux Kernel Developers List" <linux-kernel@vger.kernel.org>,
macro@linux-mips.org, ralf@linux-mips.org, dave.taht@gmail.com,
blogic@openwrt.org, andrewmcgr@gmail.com, geert@linux-m68k.org
Subject: Re: [PATCH,RFC] random: collect cpu randomness
Date: Mon, 3 Feb 2014 12:54:02 +0000 (UTC) [thread overview]
Message-ID: <Pine.BSM.4.64L.1402031249130.25530@herc.mirbsd.org> (raw)
In-Reply-To: <20140203013922.GB6264@thunk.org>
Theodore Ts'o dixit:
>I really like Jvrn's tests doing repeated boot testing and observing
>on a SMP system, the slab allocation pattern is quite deterministic.
>So even though the numbers might *look* random, an attacker with deep
>knowledge of how the kernel was compiled and what memory allocations
For this reason, we pre-initialise (one of) the RNG during kernel
compile time, using host randomness, in MirBSD. We’re also considering
pushing some additional seed using the bootloader, that can be mixed
in very very early. As an added benefit, everything in the kernel can
call arc4random(), arc4random_buf() and arc4random_uniform() without
worrying about initialisation, at all times. (This is mostly for the
places where it replaced random(), or which explicitly waited for the
regular RNG initialisation to be done, or which reseeded after that.)
In GNU/Linux, this could work like, GRUB will offer the contents of
/boot/grub/randseed.bin to the Linux kernel, which will add it into
the pool using the normal mechanisms, and (very?) early userspace
will then recreate that file (to prevent seed reuse, just like the
normal /var/db/host.random or /var/lib/urandom/random-seed processing
is done). Downside: write access to the boot medium needed. (No GRUB
modification needed, this could be passed as “faux kernel module”.)
Upside: this is way earlier than anything user space can do, and
e.g. early enough to affect things like kernel memory management.
bye,
//mirabilos
--
<Natureshadow> Ach, mach doch was du willst, du hast doch eh immer Recht!
<mirabilos> jupp ~/.etc/sig………
<Natureshadow> unfaßbar…
<Natureshadow> Mit Eszett sogar, unfaßbar!
next prev parent reply other threads:[~2014-02-03 13:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-02 20:36 Jörn Engel
2014-02-02 21:25 ` Stephan Mueller
2014-02-03 1:24 ` Jörn Engel
2014-02-03 1:28 ` H. Peter Anvin
2014-02-03 13:36 ` Stephan Mueller
2014-02-03 1:39 ` Theodore Ts'o
2014-02-03 3:35 ` Jörn Engel
2014-02-03 12:54 ` Thorsten Glaser [this message]
2014-02-03 13:06 ` Stephan Mueller
2014-02-03 15:50 ` Jörn Engel
2014-02-03 16:37 ` Theodore Ts'o
2014-02-03 18:48 ` Jörn Engel
2014-03-23 18:00 ` [PATCH] random: mix all saved registers into entropy pool Jörn Engel
2014-02-03 21:54 ` [PATCH,RFC] random: collect cpu randomness Maciej W. Rozycki
2014-02-03 22:44 ` Theodore Ts'o
2014-02-06 22:20 ` Kees Cook
2014-02-06 22:21 ` Dave Taht
2014-02-07 7:44 ` Jörn Engel
2014-02-20 9:50 ` Paolo Bonzini
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=Pine.BSM.4.64L.1402031249130.25530@herc.mirbsd.org \
--to=tg@mirbsd.de \
--cc=andrewmcgr@gmail.com \
--cc=blogic@openwrt.org \
--cc=dave.taht@gmail.com \
--cc=geert@linux-m68k.org \
--cc=joern@logfs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=smueller@chronox.de \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®