Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3257001rwb; Fri, 16 Dec 2022 12:13:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6xt0sfnB4/ppvVPGOebDJNhZsP+JJ5jd8Wd5qDWtCu4ZWZH6/mjMss5e3Jz9I9TF7pqUp/ X-Received: by 2002:a05:6402:1148:b0:461:2160:9356 with SMTP id g8-20020a056402114800b0046121609356mr43444928edw.29.1671221624185; Fri, 16 Dec 2022 12:13:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671221624; cv=none; d=google.com; s=arc-20160816; b=vmldzNmVi9fN/QZ8cVdILf+C+oAF5oSrAx2ETMtKBrIDR2qTZrPJK4ynAFkne4Khne WPJpRUGyk810kjmIZKjX0Ui80IjuTshP/wAhfipit9vjNtcJLCbAQ1ae6pmC5G8yJOFk mPPKUmPjeHWBL0F9BvZ3t9Fp3CeAm61zgpk6k8UqITGv/iSeBRw/LzNmKknAckOZ+87n oYjWw6Sp1SoWrpXHbWFqUuI3jFGKYPeZ8hWJwuc/3GBTumr5R1SYVDPlt0iBkA8FtsC3 EsIY6MvdQK1/P9D9N8nBXtj58vpJqvbA94rm7QdHOvvkjSG9nb1OCBBcj/ALP+sZ4VBu 2pUg== 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=T+8M0TJ0JPGb70GgPvLxeM0TlWsbNc1cq2r/tYrLQ1o=; b=pPXeoQFGF6u+n3IN7Vi31fS6lQQkSlwDOvclpAK6ZnwafeTbGFwvtPd6HCZxKfwQ0r CwA7C6s/NbetSaFzV+8oAH0YvOC7xIVr5x4QC5ev38bq+loPsN4Shnd37XxYhfdSXsFb 8lEEpOWndGDKgHDiGN1u3p+SCgXq2MkWNxiF3HQYR1FHIkWKEIPdjYWV2HUukoE0UsI/ vw5H497q1M9BXYrqs+W1HLD2GjShzKpBc9ygbnPkm359c9j5CZjxt4ilZbvsoGsaz/mK ETK4qIzrYoXtSlyA0efLkCdh73CjPw+mKzxFBZIWPoyKa39+Ev7g1W+yXGkvSMdhyMla ZA4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=BKzgy7QE; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a50aa84000000b0046ba3001425si3455125edc.60.2022.12.16.12.13.27; Fri, 16 Dec 2022 12:13:44 -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=@zx2c4.com header.s=20210105 header.b=BKzgy7QE; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231838AbiLPTkO (ORCPT + 68 others); Fri, 16 Dec 2022 14:40:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbiLPTkL (ORCPT ); Fri, 16 Dec 2022 14:40:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F54D69AB6; Fri, 16 Dec 2022 11:40:09 -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 99417B81DFA; Fri, 16 Dec 2022 19:40:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FB1FC433D2; Fri, 16 Dec 2022 19:40:06 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="BKzgy7QE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1671219604; 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=T+8M0TJ0JPGb70GgPvLxeM0TlWsbNc1cq2r/tYrLQ1o=; b=BKzgy7QER/wWpy4sux7J5OQDYj3xj6y5TZHDOLQZe77BvFEMWneXbPRbcNZdZwg+6XQuMZ wDsFL3aKElYmqppzrcMsLLRCn48epGzLhkb7ZZOpVWC5iP5285W0KRkV1PEWJF18/2EecC 4csh2L0RvDT24WrrNIFKcOCovxH0p34= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 34729c18 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 16 Dec 2022 19:40:03 +0000 (UTC) Date: Fri, 16 Dec 2022 12:39:56 -0700 From: "Jason A. Donenfeld" To: Johan Hovold Cc: 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=utf-8 Content-Disposition: inline In-Reply-To: <20221216091514.6298-1-johan+linaro@kernel.org> X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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-kernel@vger.kernel.org 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. Jason