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] [day] [month] [year] [list]
Message-ID: <3a03bc428ebc5741494a3e05ee98f55be2bdd3ec.camel@sipsolutions.net>
Date:   Sun, 17 Jul 2022 12:51:58 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     "Jason A. Donenfeld" <Jason@...c4.com>,
        linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     stable@...r.kernel.org,
        Anton Ivanov <anton.ivanov@...bridgegreys.com>
Subject: Re: [PATCH v4] um: seed rng using host OS rng

On Sun, 2022-07-17 at 12:50 +0200, Jason A. Donenfeld wrote:
> UML generally does not provide access to special CPU instructions like
> RDRAND, and execution tends to be rather deterministic, with no real
> hardware interrupts, making good randomness really very hard, if not
> all together impossible. Not only is this a security eyebrow raiser, but
> it's also quite annoying when trying to do various pieces of UML-based
> automation that takes a long time to boot, if ever.
> 
> Fix this by trivially calling getrandom() in the host and using that
> seed as "bootloader randomness", which initializes the rng immediately
> at UML boot.
> 
> The old behavior can be restored the same way as on any other arch, by
> way of CONFIG_TRUST_BOOTLOADER_RANDOMNESS=n or
> random.trust_bootloader=0. So seen from that perspective, this just
> makes UML act like other archs, which is positive in its own right.
> 
> Additionally, wire up arch_get_random_{int,long}() in the same way, so
> that reseeds can also make use of the host RNG, controllable by
> CONFIG_TRUST_CPU_RANDOMNESS and random.trust_cpu, per usual.
> 
> Cc: stable@...r.kernel.org
> Cc: Johannes Berg <johannes@...solutions.net>
> Acked-By: Anton Ivanov <anton.ivanov@...bridgegreys.com>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
> Johannes - I need to take this through random.git, because it relies on
> some other changes living there. Is that okay with you? -Jason

Sure, go ahead, thanks for doing this work!

> Changes v3->v4:
> - Don't include os.h, per Johannes' suggestion.

Thanks.

Acked-by: Johannes Berg <johannes@...solutions.net>


johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ