Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2360779rwj; Mon, 19 Dec 2022 03:36:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVK5oYvwM3EOZBw92qmPHyF4Ve7zFxuIrGlSqgrQ0Vj/8i0Owfo/NMAAgaIV/FPcxwhrLH X-Received: by 2002:a17:907:c241:b0:7ff:727f:65dc with SMTP id tj1-20020a170907c24100b007ff727f65dcmr6641911ejc.16.1671449792350; Mon, 19 Dec 2022 03:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671449792; cv=none; d=google.com; s=arc-20160816; b=Ylob804fILW7E6NEYq0JcW8OYpFLBnfn1ougYxv/GVfqqUpkzK80QXEPl0zfDl6Kxv pX/O9j0tAX5jtGSQ9/lU8W5i7O8ef5fzCv3K08LOx3TyKlwYM8+oNZ4M4ZRpeefe0SXT vgryDwV9pE4mG317CPrVi6KkEuM2u5ZVvoValg4Fx/x/RF89Zv5TMn5wEJTyt2arv3DP uCZXh7BQGzhFuOrO5NLkZz+oTwAVhpTRzA+MQqKYGExQNG6Ku2FSdgnHeD+CtsWsy7qN 8tSQ7n5PRJiBPucmMbObP1JJ3Nzd7vOvmR6YJTVLDSUhoBZRlHsEDX8KPH6PNkrFFSZQ EVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=orI+wxH0i2f8qua4+bl0h+3Kf33i+WJRZZ4n+WtjAxE=; b=lfXpBQEXE1wyZiwdYOPkffs8rJWLPA1kthwhDKHzubioRK/psNWvYB1Kz02Pt1gFcp ZhXHUQaCpIYb62Gb7VV+DdJkcghlkufGN3Arq3Ila3nKggkNhj+e6CP/fpB3xZXmdlvU cFD7bME+B4ZXI+xwscYC+6F+Id3t2rWAPiIw65clh3iy9SLt58eFHyl0JafLnWIAH16f PLeQ0qOA9bgYhip58kJ7zvelVOzbhs9WVbtdgYiivN/PPbECyZiw2icCsPXrUaJX8K8r YgvtN8KfSrYPQRyNGuYQhpx5H61FJQYumNThm2XEY4zkWo1yyrMfpG9mn5R4vmHZry5w cf/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="f7G/Jaxq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a05640251ca00b0045cba2d74c3si9336259edd.541.2022.12.19.03.36.14; Mon, 19 Dec 2022 03:36:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=pass header.i=@kernel.org header.s=k20201202 header.b="f7G/Jaxq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbiLSKRx (ORCPT + 70 others); Mon, 19 Dec 2022 05:17:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231698AbiLSKRs (ORCPT ); Mon, 19 Dec 2022 05:17:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052BADF38; Mon, 19 Dec 2022 02:17:39 -0800 (PST) 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 99ECBB80D3B; Mon, 19 Dec 2022 10:17:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52477C433EF; Mon, 19 Dec 2022 10:17:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671445057; bh=/QXfGOD3evtcg2IoOafPGrPY6yYtV+gJwWD2uiKF/Xw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f7G/Jaxqiuq6eW/uhjaNQwDMAFy1oaenCOM1ZU8r+oQmMw6eWzMQJEdkUbbC/Bkki 0mTsMv3UvtUh9RcCqTQmGzyYxcy2SCsQs6FtEFzugXU45CjWFrKFfqoBYIW/pHScOZ caMby89PR6O5IfqB4OpbanUrnksYmjHo2yo+6P/FmGnDzk12V7jiU6nav/LFg7gF75 GszdSyvORD/+GAbVPlhWPT2/eGWvVRDQyu9I3TUJJovUFis8/QvGGTULgbPSVGUDHb baL7VcCFRRACgNTLHpp71xO4wnpfA8/+U9x4ddRaIM8FoeoFgUc2AkHYOnC0gDMQAN p4Tu393o9dPnw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p7DDv-0002di-J3; Mon, 19 Dec 2022 11:18:19 +0100 Date: Mon, 19 Dec 2022 11:18:19 +0100 From: Johan Hovold To: "Jason A. Donenfeld" Cc: Johan Hovold , Ard Biesheuvel , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Steev Klimaszewski , Bjorn Andersson Subject: Re: [PATCH] efi: random: fix NULL-deref when refreshing seed Message-ID: References: <20221216091514.6298-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-kernel@vger.kernel.org On Fri, Dec 16, 2022 at 12:39:56PM -0700, Jason A. Donenfeld wrote: > On Fri, Dec 16, 2022 at 10:15:14AM +0100, Johan Hovold wrote: > > Do not try to refresh the RNG seed in case the firmware does not support > > setting variables. > > > > This is specifically needed to prevent a NULL-pointer dereference on the > > Lenovo X13s with some firmware revisions. > > > > Fixes: e7b813b32a42 ("efi: random: refresh non-volatile random seed when RNG is initialized") > > Reported-by: Steev Klimaszewski > > Reported-by: Bjorn Andersson > > Signed-off-by: Johan Hovold > > --- > > Thanks very much for this, and sorry for the breakage. I'll try to get > this in before rc1 is cut, as I've got some other changes scheduled for > late in the merge window to send anyway. In case this one hasn't been picked up yet (it's not in linux-next), I just sent a v2 with an amended commit message with an explicit mention that as this is needed whenever the runtime services have been disabled (e.g. with PREEMPT_RT): https://lore.kernel.org/lkml/20221219101237.9872-1-johan+linaro@kernel.org/ Johan