Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C94C9C433F5 for ; Tue, 11 Jan 2022 04:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347785AbiAKEVr (ORCPT ); Mon, 10 Jan 2022 23:21:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231966AbiAKEVr (ORCPT ); Mon, 10 Jan 2022 23:21:47 -0500 X-Greylist: delayed 475 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 10 Jan 2022 20:21:47 PST Received: from cavan.codon.org.uk (cavan.codon.org.uk [IPv6:2a00:1098:84:22e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1131BC06173F for ; Mon, 10 Jan 2022 20:21:46 -0800 (PST) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 7C9DA424F9; Tue, 11 Jan 2022 04:13:49 +0000 (GMT) Date: Tue, 11 Jan 2022 04:13:49 +0000 From: Matthew Garrett To: Theodore Ts'o Cc: Andy Lutomirski , "Jason A. Donenfeld" , Marcelo Henrique Cerri , Simo Sorce , Greg Kroah-Hartman , Jeffrey Walton , Stephan Mueller , Linux Crypto Mailing List , Willy Tarreau , Nicolai Stange , Linux Kernel Mailing List , Arnd Bergmann , "Eric W. Biederman" , "Alexander E. Patrakov" , "Ahmed S. Darwish" , Vito Caputo , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , zhangjs , Florian Weimer , Lennart Poettering , Peter Matthias , Neil Horman , Randy Dunlap , Julia Lawall , Dan Carpenter , Andy Lavr , Petr Tesarik , John Haxby , Alexander Lobakin , Jirka Hladky , Eric Biggers Subject: Re: [PATCH v43 01/15] Linux Random Number Generator Message-ID: <20220111041349.GA5542@srcf.ucam.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jan 10, 2022 at 10:10:15PM -0500, Theodore Ts'o wrote: > Right now, the enterprise distros are doing their own thing, and quite > frankly, I don't see a problem with that. If it turns out DRBG is > less secure (and there are some things that fill me with disquiet), > then let them take the economic consequences, since they are the ones > who are doing this for the economic advantages of trying to claim FIPS > compliance. The goal is to identify a solution that avoids the enterprise kernels needing to do their own thing. They're in a position to globally LD_PRELOAD something to thunk getrandom() to improve compatibility if they want to, and they're also able to define the expected level of breakage if you enable FIPS mode. An approach that allows a single kernel to provide different policies in different contexts (eg, different namespaces could have different device nodes providing /dev/random) makes it easier to configure that based on customer requirements. > If we must support this in the upstream kernel, then configure it via > CONFIG_RANDOM_SECURITY_THEATRE which redirects getrandom(2) and > /dev/[u]random to DRBG. I'd prefer that it be possible for someone to > put "random_security_theatre=0" on the boot command line which would > disable redirecting the interfaces to DRBG so if it turns out that > DRBG *is* less secure, we can give advice on how to turn it off > without requiring a patched kernel. :-) The majority of enterprise customers don't need FIPS compliance, so all that would happen in that case is that the vendors would flip the sense of that config option and the docs for enterprise distros and mainline would be out of sync. I understand that this is a situation where a niche case is making life miserable for everyone else, and I understand that this is a hole that the enterprise world has dug for itself, but where there are people expressing a real tangible use case that exists for reasons outside their control, it really feels like we should try to find a solution that works for everyone.