lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Jan 2017 22:49:07 -0500
From:   Theodore Ts'o <tytso@....edu>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH 1/2] random: use chacha20 for get_random_int/long

Hi Jason,

I've been taking a look at your patch, and i think it's... problematic.

You're using a union for the entropy_u64 and entropy_u32 arrays, and
the position field is used to indexed into those two arrays.

So if the first caller calls get_random_u64 with position=0, it will
get the first 64 bits out of the batched entropy, and increment the
position to 1.  If the second caller calls get_random_u32 with
position=1... it will get the second of the 32-bit chunks in the
batched entropy array --- which will include the 64 bits returned to
the first caller.

That's not very random.   :-(

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ