linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Reading large amounts from /dev/urandom broken
@ 2014-07-23 13:52 Andrey Utkin
  2014-07-23 14:32 ` Hannes Frederic Sowa
  2014-07-23 15:14 ` Theodore Ts'o
  0 siblings, 2 replies; 8+ messages in thread
From: Andrey Utkin @ 2014-07-23 13:52 UTC (permalink / raw)
  To: tytso, hannes; +Cc: linux-kernel

Dear developers, please check bugzilla ticket
https://bugzilla.kernel.org/show_bug.cgi?id=80981 (not the initial
issue, but starting with comment#3.

Reading from /dev/urandom gives EOF after 33554431 bytes.  I believe
it is introduced by commit 79a8468747c5f95ed3d5ce8376a3e82e0c5857fc,
with the chunk

nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3));

which is described in commit message as "additional paranoia check to
prevent overly large count values to be passed into urandom_read()".

I don't know why people pull such large amounts of data from urandom,
but given today there are two bugreports regarding problems doing
that, i consider that this is practiced.

-- 
Andrey Utkin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-08-12  9:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-23 13:52 Reading large amounts from /dev/urandom broken Andrey Utkin
2014-07-23 14:32 ` Hannes Frederic Sowa
2014-07-23 15:14 ` Theodore Ts'o
2014-07-23 15:19   ` Hannes Frederic Sowa
2014-07-24 20:39     ` Alex Elsayed
2014-08-09  7:45   ` Pavel Machek
2014-08-10 11:51     ` Andrey Utkin
2014-08-12  9:14       ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).