]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
random: set up the NUMA crng instances after the CRNG is fully initialized
authorTheodore Ts'o <tytso@mit.edu>
Wed, 11 Apr 2018 19:23:56 +0000 (15:23 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:23:28 +0000 (12:23 +0200)
commite8090857d85e342ead55ddeeb9bd04a7a20b5dc2
treee7a48e395e44fb9be0dad4ae9b6643ac3e2992dc
parent6b1ab264a5f1d8a33380649c8e7e52e47eb0351d
random: set up the NUMA crng instances after the CRNG is fully initialized

BugLink: http://bugs.launchpad.net/bugs/1778265
commit 8ef35c866f8862df074a49a93b0309725812dea8 upstream.

Until the primary_crng is fully initialized, don't initialize the NUMA
crng nodes.  Otherwise users of /dev/urandom on NUMA systems before
the CRNG is fully initialized can get very bad quality randomness.  Of
course everyone should move to getrandom(2) where this won't be an
issue, but there's a lot of legacy code out there.  This related to
CVE-2018-1108.

Reported-by: Jann Horn <jannh@google.com>
Fixes: 1e7f583af67b ("random: make /dev/urandom scalable for silly...")
Cc: stable@kernel.org # 4.8+
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/char/random.c