Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp236178imn; Mon, 25 Jul 2022 15:01:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1svViNh69dwzyY4DeSsL1D3Y0/rvIrLmXL8I5ACm0SBEIO1WkBgL4p69T7k30n+BWbjXNca X-Received: by 2002:a05:6402:2891:b0:43b:c2a5:dbd0 with SMTP id eg17-20020a056402289100b0043bc2a5dbd0mr15365320edb.96.1658786506169; Mon, 25 Jul 2022 15:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658786506; cv=none; d=google.com; s=arc-20160816; b=tzfHIpkUxQyT7GoSVagPXilgm2SA44ohYXpcqzLTkcOJB8excunw2E72YNvCTdrQBm lnWH0hMC1ZtP5KC6IQZUoDifzmWdMizODOQYP872qzlJc0z1fm1NU0hO8Uk/1e+WIi4O bfGUryh65qRqOujVrXczrZnOJITa77OWQndSoD0TWL4uS2y2qqVU3hZRD6xbJrMOKIfX 0DyTV9rX3ysvzQVZfajAO2WG6AO7xBig/CKiNXEqaNT/YIjYFHbLaTrZqcEWrWiG1J+E 7J8JpBlzQSXzz4vJNJxOvDBJDp71Y0ul/MXLg1dDcxxQj8MnP4qMjcUsTzb1Yj3KSXXH yGsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9+idQqBWdX5mURxuBE4eJRKFRCSZyA5bMwG+uu+jVjQ=; b=yv8Wqli8HrbDKNBPsofEFeOa3XJwR8fQIL4aQ2HKjX6UBOdRQWUQBkXLCBxF+vTJII nz6HB1fdHWFH7PCyh4vH8Cjx3Ax5xtpjktICZuCgFfZK2/N9kMDl0HhVfAks8x2uRgEq Bchtme38AOTB3hTjJ8QtNs5Vmqb0VavSme9k8eJOxC8MASCCGWe1tDTS5ow4mDLvZvnY 6TGzoGYcJJ4jRIs9kETCrXoqRqq5+/UVFnvq8vvKx/nRlqsJU3aXVC5lhiR3cW4WWAXR xyt5oemJ5JRw0Tzp/nTdIY7J6XkmZ5u7DcBP+TzJoX9r53OH0UoiAVB0qIH5EbLAT3X4 iqbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@opensuse.org header.s=20210105 header.b=NWwLCWgD; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=opensuse.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020aa7d808000000b0043a6fd52d9dsi14267885edq.392.2022.07.25.15.01.08; Mon, 25 Jul 2022 15:01:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@opensuse.org header.s=20210105 header.b=NWwLCWgD; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=opensuse.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236996AbiGYVum (ORCPT + 99 others); Mon, 25 Jul 2022 17:50:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237340AbiGYVuV (ORCPT ); Mon, 25 Jul 2022 17:50:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 752FB26D4 for ; Mon, 25 Jul 2022 14:50:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1015EB81134 for ; Mon, 25 Jul 2022 21:50:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60D5DC341D4 for ; Mon, 25 Jul 2022 21:50:10 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=opensuse.org header.i=@opensuse.org header.b="NWwLCWgD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=opensuse.org; s=20210105; t=1658785809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9+idQqBWdX5mURxuBE4eJRKFRCSZyA5bMwG+uu+jVjQ=; b=NWwLCWgDFfEUWkioLqbm9ZECVuyxCQq+mwopu1MRZGsy9KH50bPpuuCCQA0cexc3ePXnUz pJIs1Ro3g7ShR5n8ZjBQXr7D88/3Pogxxf++jX/tr6t0SOIyzRiy0rDsdM4HCa9P6wy6rt vuM8Aou/b2v2CfvsaMWi+asXYehu9CQ= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id ba595037 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 25 Jul 2022 21:50:09 +0000 (UTC) MIME-Version: 1.0 References: <6bf352e9-1312-40de-4733-3219721b343c@linaro.org> <20220725153303.GF7074@brightrain.aerifal.cx> <878rohp2ll.fsf@oldenburg.str.redhat.com> <20220725174430.GI7074@brightrain.aerifal.cx> In-Reply-To: <20220725174430.GI7074@brightrain.aerifal.cx> From: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Date: Mon, 25 Jul 2022 14:33:05 -0400 Message-ID: Subject: Re: arc4random - are you sure we want these? To: Rich Felker Cc: Florian Weimer , Yann Droneaud , jann@thejh.net, "Jason A. Donenfeld" , libc-alpha@sourceware.org, Michael@phoronix.com, linux-crypto@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jul 25, 2022 at 1:44 PM Rich Felker wrote: > Then don't fallback to /dev/urandom. Those are my thoughts as well.. but __libc_fatal() if there is no usable getrandom syscall with the needed semantics, in short making this interface usable only when the kernel is. This is quite drastic, but probably the only sane way to go.