lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 29 Dec 2021 03:38:51 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Patrick Williams <patrick@...cx.xyz>
Cc:     Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>,
        Hao Wu <hao.wu@...rik.com>, stable@...r.kernel.org,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tpm: fix NPE on probe for missing device

On Thu, Dec 23, 2021 at 09:49:31AM -0600, Patrick Williams wrote:
> When using the tpm_tis-spi driver on a system missing the physical TPM,
> a null pointer exception was observed.
> 
>     [    0.938677] Unable to handle kernel NULL pointer dereference at virtual address 00000004
>     [    0.939020] pgd = 10c753cb
>     [    0.939237] [00000004] *pgd=00000000
>     [    0.939808] Internal error: Oops: 5 [#1] SMP ARM
>     [    0.940157] CPU: 0 PID: 48 Comm: kworker/u4:1 Not tainted 5.15.10-dd1e40c #1
>     [    0.940364] Hardware name: Generic DT based system
>     [    0.940601] Workqueue: events_unbound async_run_entry_fn
>     [    0.941048] PC is at tpm_tis_remove+0x28/0xb4
>     [    0.941196] LR is at tpm_tis_core_init+0x170/0x6ac
> 
> This is due to an attempt in 'tpm_tis_remove' to use the drvdata, which
> was not initialized in 'tpm_tis_core_init' prior to the first error.
> 
> Move the initialization of drvdata earlier so 'tpm_tis_remove' has
> access to it.
> 
> Signed-off-by: Patrick Williams <patrick@...cx.xyz>
> Fixes: 79ca6f74dae0 ("tpm: fix Atmel TPM crash caused by too frequent queries")
> Cc: stable@...r.kernel.org

Thank you.
 
Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ