From: Theodore Ts'o <tytso@mit.edu>
To: Daniel Borkmann <dborkman@redhat.com>,
davem@davemloft.net, shemminger@networkplumber.org,
fweimer@redhat.com, netdev@vger.kernel.org,
Eric Dumazet <eric.dumazet@gmail.com>,
linux-wireless@vger.kernel.org, keescook@chromium.org
Subject: Re: [PATCH] random: seed random_int_secret at least poorly at core_initcall time
Date: Wed, 13 Nov 2013 21:54:48 -0500 [thread overview]
Message-ID: <20131114025448.GB31602@thunk.org> (raw)
In-Reply-To: <20131112134603.GE14929@order.stressinduktion.org>
On Tue, Nov 12, 2013 at 02:46:03PM +0100, Hannes Frederic Sowa wrote:
> > It is needed by fork to set up the stack canary. And this actually gets
> > called before the secret is initialized.
>
> Maybe we could use this for the time being and use the seeding method
> of kaslr as soon as it hits the tree?
Hmm, from what I can tell even early_initcall() is going to be early
enough. The stack canary is set up by boot_init_stack_canary(), which
is run very, very early in start_kerne() --- way before
early_initcalls, or even before interrupts are enabled. So adding
random_int_secret_init_early() as a core_initcall is still too late.
I wonder if we need to do something in common with what Kees has been
considering for the kaslr code, since it's a similar issue --- we need
random number way earlier than we can really afford to initialize
/dev/random.
- Ted
P.S. Unless I'm missing something (and I hope I am), it would appear
that the stack canary is going to easily predictable by an attacker on
non-x86 platforms that don't have RDRAND. Has someone tested whether
or not the stack canary isn't constant across ARM or pre-Sandy Bridge
x86 systems?
WARNING: multiple messages have this Message-ID (diff)
From: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
To: Daniel Borkmann
<dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
shemminger-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org,
fweimer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Eric Dumazet
<eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: Re: [PATCH] random: seed random_int_secret at least poorly at core_initcall time
Date: Wed, 13 Nov 2013 21:54:48 -0500 [thread overview]
Message-ID: <20131114025448.GB31602@thunk.org> (raw)
In-Reply-To: <20131112134603.GE14929-5j1vdhnGyZutBveJljeh2VPnkB77EeZ12LY78lusg7I@public.gmane.org>
On Tue, Nov 12, 2013 at 02:46:03PM +0100, Hannes Frederic Sowa wrote:
> > It is needed by fork to set up the stack canary. And this actually gets
> > called before the secret is initialized.
>
> Maybe we could use this for the time being and use the seeding method
> of kaslr as soon as it hits the tree?
Hmm, from what I can tell even early_initcall() is going to be early
enough. The stack canary is set up by boot_init_stack_canary(), which
is run very, very early in start_kerne() --- way before
early_initcalls, or even before interrupts are enabled. So adding
random_int_secret_init_early() as a core_initcall is still too late.
I wonder if we need to do something in common with what Kees has been
considering for the kaslr code, since it's a similar issue --- we need
random number way earlier than we can really afford to initialize
/dev/random.
- Ted
P.S. Unless I'm missing something (and I hope I am), it would appear
that the stack canary is going to easily predictable by an attacker on
non-x86 platforms that don't have RDRAND. Has someone tested whether
or not the stack canary isn't constant across ARM or pre-Sandy Bridge
x86 systems?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-11-14 2:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 11:20 [PATCH net-next 0/6] prandom fixes/improvements Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 1/6] random32: fix off-by-one in seeding requirement Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 2/6] random32: add periodic reseeding Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 3/6] random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized Daniel Borkmann
2013-11-11 13:43 ` Theodore Ts'o
2013-11-12 0:03 ` Hannes Frederic Sowa
2013-11-12 0:37 ` Karl Beldan
2013-11-12 0:37 ` Karl Beldan
2013-11-12 8:36 ` Johannes Berg
2013-11-12 8:36 ` Johannes Berg
2013-11-12 11:13 ` Karl Beldan
2013-11-12 11:13 ` Karl Beldan
2013-11-12 13:09 ` Hannes Frederic Sowa
2013-11-12 11:53 ` Theodore Ts'o
2013-11-12 12:04 ` Johannes Berg
2013-11-12 13:16 ` Hannes Frederic Sowa
2013-11-12 13:16 ` Hannes Frederic Sowa
2013-11-12 13:46 ` [PATCH] random: seed random_int_secret at least poorly at core_initcall time Hannes Frederic Sowa
2013-11-12 13:46 ` Hannes Frederic Sowa
2013-11-14 2:54 ` Theodore Ts'o [this message]
2013-11-14 2:54 ` Theodore Ts'o
2013-11-14 4:18 ` Hannes Frederic Sowa
2013-11-14 5:05 ` Hannes Frederic Sowa
2013-11-14 5:05 ` Hannes Frederic Sowa
2013-11-15 18:42 ` Kees Cook
2013-11-16 7:40 ` Hannes Frederic Sowa
2013-11-16 7:40 ` Hannes Frederic Sowa
2013-11-15 18:33 ` Kees Cook
2013-11-15 18:33 ` Kees Cook
2013-11-15 18:45 ` Dave Jones
2013-11-15 18:45 ` Dave Jones
2013-11-15 19:07 ` Kees Cook
2013-11-15 21:05 ` Theodore Ts'o
2013-11-15 21:05 ` Theodore Ts'o
2013-11-11 11:20 ` [PATCH net-next 4/6] random32: move rnd_state to linux/random.h Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 5/6] random32: upgrade taus88 generator to taus113 from errata paper Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 6/6] random32: add test cases for taus113 implementation Daniel Borkmann
2013-11-11 19:33 ` [PATCH net-next 0/6] prandom fixes/improvements David Miller
2013-11-11 19:44 ` Hannes Frederic Sowa
2013-11-11 20:00 ` David Miller
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=20131114025448.GB31602@thunk.org \
--to=tytso@mit.edu \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=fweimer@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@networkplumber.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 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.