[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081006234444.GA20740@one.firstfloor.org>
Date: Tue, 7 Oct 2008 01:44:44 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Kees Cook <kees.cook@...onical.com>
Cc: Andi Kleen <andi@...stfloor.org>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org, Jakub Jelinek <jakub@...hat.com>,
Ulrich Drepper <drepper@...hat.com>, libc-alpha@...rceware.org
Subject: Re: [PATCH] ELF: implement AT_RANDOM for future glibc use
On Mon, Oct 06, 2008 at 04:29:36PM -0700, Kees Cook wrote:
> > > I'd really love to see this solved. My goal is to get a mainline glibc
> > > patch for a low-cost randomized stack guard value.
> >
> > Your current implementation is high cost.
> >...
> > random32() is not a cryptographically strong RNG. I suspect it would
> > be pretty easy to reverse engineer its seed given some state. It hasn't
> > been designed to be protected against that.
>
> It's being used for randomness in the networking code, so it's at least
> mildly random "enough".
Only for applications there which are not considered security sensitive.
I think. A general review of all the rngs in the kernel would be
probably a good idea.
Note that there are also several degrees of random
requirements in the networking code.
e.g. IPsec clearly needs stronger randomness than pktgen.
A lot of users are somewhere inbetween. e.g. I suspect the regular
routing cache rehashing would also be a excellent client of a
a new medium quality rng facility.
>
> > IMHO it needs a new class of random numbers in the kernel that use
> > some cryptographically strong RNG (there are a couple of candidates
> > like yarrow) which is very rarely seeded
> > from the entropy pool[1] and use that for these applications.
> > A couple of other users in the kernel would benefit that too,
> > most users of get_random_bytes() probably should be reviewed
> > for their true requirements.
>
> Sure, but this is a larger (and pre-existing) problem.
Yes it is, but since you propose to extend the problematic
usage much further (and also eating incredible amounts of entropy
on many workloads) you end up with the task of solving
this problem first, sorry.
>
> > Ideally expose it to userland too so that dumb users like
> > tmpfile can use it too.
>
> Would you propose that it get hooked to /dev/urandom?
It would need to be a new device.
The problem is that since noone in their right mind really still
uses /dev/random (except perhaps for gpg secret keygen) a lot
of real cryptographic applications also use /dev/urandom. And silently
changing the semantics under those wouldn't be nice.
The abusers like tmpfile etc. would just need to be fixed to
use a different interface.
-Andi
--
ak@...ux.intel.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists