Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp244683pxb; Mon, 13 Sep 2021 18:12:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsZIumrNkS+tuTCd1OgEOORIHV4KmgqRttD2/KMIECZ8lA+NCFb3cusSfIe9KEAlKOTTLx X-Received: by 2002:a05:6402:1241:: with SMTP id l1mr4187246edw.123.1631581948710; Mon, 13 Sep 2021 18:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631581948; cv=none; d=google.com; s=arc-20160816; b=Q4biLACYSZbUq9kguA/x0PnP2d+JksOwMNaWWPgMP1OruIIULTI5StjvjtcBzM8bIo xj3Dsxaig0ubxij+sn9zayqQsTUNmHz7+lK8mnuRwP5hylSiYAxWoZtIa+XeaxT4AhQo fSneNJa9OwVtWAWbOIjt/Ox2ACbSY4Tp2GTRPi4PF3b9sI5+RfYgDqQw0eRsSCkz4jha 1GvdRt9NXeJX39Ax03zWXWJRtbPk/+qH6zA2JvkjKH7EWUfSJOLfC7Y2Wo8FAD3Cx7bz Flv9sOhULwUlfpI9v0YtcQHNnTalBq9Ided8hwVNKmlt70QkNqs8KYynpIosUj35iPq5 dCBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :sensitivity:importance:date:subject:cc:to:from:message-id :mime-version:dkim-signature; bh=8LyRUmRax3hCQti0YfuqbJX2nczTd/Squcie9S85a+8=; b=gBbPlD5h0lfDw/5btY2SUkMzwMSb5bm0kscZCMnvOSzrTBRpG14DfISPtSE0Xm/rq4 cscToLkDH6vAZ9A512BnajiHpLEtv0sK4e7BARzymXn6Jdrj/X6aQ/SS7ZcRKwhUd+JR ATSujxZD/bEOO3T2id7yBVi/6C5WthL3snFGp5PJic1hpHd3XiT5RQigDARfR8kL11wG yLlI55SoY6NHcIkLmhTDdosgf/YKvlOAiMBpRL7sLpliC0Sab9PIS6adfTYr2vakQfdz Uj6OaPNzpeeYin0j0wrYXPPtDL1a2ais0PIqdfqXnYGBqTPNvJW1+zXj/xdzZRvnAPGN iO7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="g7nFy/z0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si9051441edv.503.2021.09.13.18.12.05; Mon, 13 Sep 2021 18:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="g7nFy/z0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242545AbhIMUzQ (ORCPT + 99 others); Mon, 13 Sep 2021 16:55:16 -0400 Received: from mout.gmx.net ([212.227.15.18]:55017 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244584AbhIMUzN (ORCPT ); Mon, 13 Sep 2021 16:55:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1631566431; bh=8LyRUmRax3hCQti0YfuqbJX2nczTd/Squcie9S85a+8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=g7nFy/z0PY4tvbyJWJLup+J0g1wGQ8/DMV5IbHxxDkgGzguTsNoUbl+UbsY4zdqGl 6rtV3oO2qWPQ7CzTj/g7KwjrFsw1Jjjs8mkV9hTy1K8vdDAGeAp3qNRMbtkXGIpz1Z wRKg6q8i33JE5mOKh/tZaKkbT3dT71P0mh7fF/d0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [46.223.119.124] ([46.223.119.124]) by web-mail.gmx.net (3c-app-gmx-bs69.server.lan [172.19.170.214]) (via HTTP); Mon, 13 Sep 2021 22:53:50 +0200 MIME-Version: 1.0 Message-ID: From: Lino Sanfilippo To: Jarkko Sakkinen Cc: peterhuewe@gmx.de, jgg@ziepe.ca, p.rosenberger@kunbus.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Aw: Re: [PATCH] tpm: fix potential NULL pointer access in tpm_del_char_device() Content-Type: text/plain; charset=UTF-8 Date: Mon, 13 Sep 2021 22:53:50 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <204a438b6db54060d03689389d6663b0d4ca815d.camel@kernel.org> References: <20210910180451.19314-1-LinoSanfilippo@gmx.de> <204a438b6db54060d03689389d6663b0d4ca815d.camel@kernel.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:mRkR/BryvYpdOREPVnSkv4q0GMCGed0FmfaW+Ko5NshPxZKEfu7va6u5xiYPB+DIck60l aOczt6/VhN5Jfg+sGpER8I+Hfqz+XmNyIa5AY8MSk1UfOo8UPaM6k6a/BS9HliCW0rmRWGE40Gv4 BkKGFAdup4fQyXsMaGZRGWIQv5zlc3OidRSIREpuCmjPZYXUR/6BBwb+2UU2zwGN7W4nvbK5/YYJ 4qQyjuEetyu9FChhkyF5TlZKansz2utakOO8YjkbrHhS3y9mN1vzuZ6lsOBogWaMMvY+ywsvkFc+ O0= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:uYuHfN1JriI=:DtBZSOURbchsaDSgWzW7Ft ZZm2cxBJMVEcr3QvMPfDI4v/RcUvDnLYOfBN7a51Bcoc0HgJNHTZlf8KVYoPcn/hFFDCqmfBP I3Lpd0YPn20QvyhQdJ79OqozjJspVp0oEbWYKJHGgp8NurvSn4sJqdTl6clcrsRbigpOBJtP3 j0ForO/Y5/hQRiz24DNFT5x/0mHuAdPfBwx2l0pki92pf4FNfTxA7LoUxgwBXQNaqWt55tUg0 RHk1w+03EVofwjKTD/xaZMVYsz91RmCfvsZnn3gNVV1gG5fG7eZcwX6Mg2/xHFUiR4CdPrAnh 3r0eHecwbsowgUxVbX99fx40t2+cNkxPLpcLvA6bs/F0PQVcoXnK+9J2UloCS3VoBz770RXjb SMgghoWUcIyNT2QgKjcffVr0IGBDDFURdtkWq2A/qVL3PzkOw4FUu3dad+/pvrYBlPMknP39Q zt0trDwTJ2YltPwVUEIuMBYcS1KRHNDrPtYNYnAo2Kg4PL0A0OLlhvaTnL4bfsS7JYleLBkDj Fg0DBU+zNjUtdi6uNh6qqAx28xNvy8EB5nIykIAEzZK3zsu0TI9PFfDPsW2eD1JnrnS2nCC29 j8LdpEtvQ1LHCi+JXH/xYtbNg9zuRMpO2R8i+9g6TRrOOZi9PsDDsaFwVZyJWCdRixhB6FYrX wkPS0/xq7ipPgWfP8VdYNaJhtnr5iC/UGH+Krt3eUBtaFdHl1IjdR48xx0ceoCJsmtYcsHhi1 9ZXGbvq2bcz3mk7Miom/eOT7nGWgMKf9OKD5gcsASiMlT5QwHEcA/eWduF6X6PZJBxYowvPKl yYPKKiv Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Gesendet: Montag, 13. September 2021 um 22:25 Uhr > Von: "Jarkko Sakkinen" > An: "Lino Sanfilippo" , peterhuewe@gmx.de, jgg@zi= epe.ca > Cc: p.rosenberger@kunbus.com, linux-integrity@vger.kernel.org, linux-ker= nel@vger.kernel.org, stable@vger.kernel.org > Betreff: Re: [PATCH] tpm: fix potential NULL pointer access in tpm_del_c= har_device() > > On Fri, 2021-09-10 at 20:04 +0200, Lino Sanfilippo wrote: > > In tpm_del_char_device() make sure that chip->ops is still valid. > > This check is needed since in case of a system shutdown > > tpm_class_shutdown() has already been called and set chip->ops to NULL= . > > This leads to a NULL pointer access as soon as tpm_del_char_device() > > tries to access chip->ops in case of TPM 2. > > > > Fixes: dcbeab1946454 ("tpm: fix crash in tpm_tis deinitialization") > > Cc: stable@vger.kernel.org > > Signed-off-by: Lino Sanfilippo > > --- > > Have you been able to reproduce this in some environment? > > /Jarkko > > Yes, this bug is reproducable on my system that is running a 5.10 raspberr= y kernel. I use a SLB 9670 which is connected via SPI. Regards, Lino