[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190916195357.GA3312@darwi-home-pc>
Date: Mon, 16 Sep 2019 21:53:57 +0200
From: "Ahmed S. Darwish" <darwish.07@...il.com>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Willy Tarreau <w@....eu>, Vito Caputo <vcaputo@...garu.com>,
Lennart Poettering <mzxreary@...inter.de>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Jan Kara <jack@...e.cz>, Ray Strode <rstrode@...hat.com>,
William Jon McCann <mccann@....edu>,
"Alexander E. Patrakov" <patrakov@...il.com>,
zhangjs <zachary@...shancloud.com>, linux-ext4@...r.kernel.org,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: Linux 5.3-rc8
On Mon, Sep 16, 2019 at 01:21:17PM -0400, Theodore Y. Ts'o wrote:
> On Mon, Sep 16, 2019 at 09:17:10AM -0700, Linus Torvalds wrote:
> > So the semantics that getrandom() should have had are:
> >
> > getrandom(0) - just give me reasonable random numbers for any of a
> > million non-strict-long-term-security use (ie the old urandom)
> >
> > - the nonblocking flag makes no sense here and would be a no-op
>
> That change is what I consider highly problematic. There are a *huge*
> number of applications which use cryptography which assumes that
> getrandom(0) means, "I'm guaranteed to get something safe
> cryptographic use". Changing his now would expose a very large number
> of applications to be insecure. Part of the problem here is that
> there are many different actors. There is the application or
> cryptographic library developer, who may want to be sure they have
> cryptographically secure random numbers. They are the ones who will
> select getrandom(0).
>
> Then you have the distribution or consumer-grade electronics
> developers who may choose to run them too early in some init script or
> systemd unit files. And some of these people may do something stupid,
> like run things too early, or omit the a hardware random number
> generator in their design, even though it's for a security critical
> purpose (say, a digital wallet for bitcoin).
Ted, you're really the expert here. My apologies though, every time I
see the words "too early" I get a cramp... Please check my earlier
reply:
https://lkml.kernel.org/r/20190912034421.GA2085@darwi-home-pc
Specifically the trace_printk log of all the getrandom(2) calls
during an standard Archlinux boot...
where is the "too early" boundary there? It's undefinable.
You either have entropy, or you don't. And if you don't, it will stay
like this forever, because if you had, you wouldn't have blocked in
the first place...
Thanks,
--
Ahmed Darwish
http://darwish.chasingpointers.com
Powered by blists - more mailing lists