Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2557280rwj; Mon, 19 Dec 2022 06:11:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXu94IdiiVlSKBfVr/6qqm22RphtoZ9Q/xetYBPk/iIzDRff9GXtiujJVD88OVdQCZQyWDTa X-Received: by 2002:a05:6402:2899:b0:472:cf27:6991 with SMTP id eg25-20020a056402289900b00472cf276991mr16947187edb.22.1671459117499; Mon, 19 Dec 2022 06:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671459117; cv=none; d=google.com; s=arc-20160816; b=jIx9FmhEg7k6pXULWNoYSQlrFWdSLq8XaVkgLoeyBnOaNzyrM205Q2mCG/pkHn4xx1 krVZuLHw2rURp03LEbkHQZdL4ZXmeoKOhp8Kl1KeHDoo05yWd91xYW883pbhZgFI+aFJ NZfyO81wXQf5ybmldnrQl6rQQ7bDlbuhbrBs+DRblxqGMXToJUEPTvXC6XA2BxxIUAWc eUUHl5osb25v+ROwxbcHM2LzQWcQWIRnojBGQWWTAAqlwsCA1H5/604y2fh/CP5ad72k vxCsq4/sT49tp98IVbclgiiLPOwjhNKZy2sttVCrfSq4WCD17VIwjXrG0a/Rc4SxcSQK QZUw== 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=TIkK/wJZUBgOWlEjKmLuEB+VYHJPSibZSiNwu6O8JlM=; b=atsZY4Jfjk5DrNbMZT5R6HeRLRFdZE6ZC53L+1UPpgMttOv047LfSt2zfaj1QDKvv1 Cp/l/auTEt0kAqOg0wk8PdtuTi1hKkHHTrTuBHEpdPeZsVNH/VDOSq72zAcVhaP1hZBX n/oJ7bh5VF8FnMk5Ks20murnEAjqPtAY2Jtx7HgzQ0Je3CQrgzD6keHSfoPK62bh9ibY r4Mh46Grwb1jF4aMgI37vNoijpx2qV6uKy4IGgClZPi4u/pkSpLlcN5LbSf7xG/y7397 BGXUK7zC2Jc660U7Sg87SNorkiANjeaJQYMD5ngPUXDohoTC6Eh8rkddG/zixjKoK6m0 mq7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c3WPBXdM; 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 h12-20020a056402280c00b0044ee4ec8915si10411983ede.39.2022.12.19.06.11.39; Mon, 19 Dec 2022 06:11:57 -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=c3WPBXdM; 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 S231377AbiLSOHq (ORCPT + 71 others); Mon, 19 Dec 2022 09:07:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbiLSOHn (ORCPT ); Mon, 19 Dec 2022 09:07:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4640DF7E; Mon, 19 Dec 2022 06:07:42 -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 5335EB80E47; Mon, 19 Dec 2022 14:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6784C433D2; Mon, 19 Dec 2022 14:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671458860; bh=jnYINdu24VdAEVzqnIj/Cg8Ji+aqIMSc48Z2PvyIMUc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c3WPBXdM0YVicDy0txiCVE73O37zNcVLq22Pl5JMouVBWHouD49EZ7bj60g+l7EbZ K/hNDZjPj8uCzbcBKlpjDYYhhUjTft0IVjyW4mPaSUjtxFk9k2osuGs8tLeHTesgEL lswNlO/d2USBhvr2N6qSpuAH8SkHi4Ct/aBZL+yzAwmRyrGGRbvVhCRoDipVyQ0NyA LNiAxIit1YdfC68PV15f9RkoMJ/DeWRRI3/JiQqHiATiDMjmGABp0CUw0eQ03RdjdE Tnb4u1hjQcMOaYW9Z85ejoib1c9mF8R9O0RkOEMbtYiGORuFvRSPB18LKDmv2rDAUA t5x0lbLOtXK0g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p7GoY-00008j-P7; Mon, 19 Dec 2022 15:08:22 +0100 Date: Mon, 19 Dec 2022 15:08:22 +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 , Andrew Halaney Subject: Re: [PATCH v2] efi: random: fix NULL-deref when refreshing seed Message-ID: References: <20221219101237.9872-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 Mon, Dec 19, 2022 at 03:00:17PM +0100, Jason A. Donenfeld wrote: > On Mon, Dec 19, 2022 at 11:12:37AM +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, or more generally, whenever > > the runtime services have been disabled (e.g. efi=noruntime or with > > PREEMPT_RT). > > > > Fixes: e7b813b32a42 ("efi: random: refresh non-volatile random seed when RNG is initialized") > > Reported-by: Steev Klimaszewski > > Reported-by: Bjorn Andersson > > Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s > > Signed-off-by: Johan Hovold > > --- > > > > Changes in v2 > > - amend commit message with a comment on this being needed whenever the > > runtime services have been disabled > > I'll queue up the one with the amended commit message. Perfect, thanks! Johan