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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBlkRCWAJXWkTQI2@kroah.com>
Date:   Tue, 21 Mar 2023 09:01:08 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Cc:     error27@...il.com, Peter Huewe <peterhuewe@....de>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Jason Gunthorpe <jgg@...pe.ca>,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH next] tpm: Fix a possible dereference of ERR_PTR in
 tpm_init()

On Mon, Mar 20, 2023 at 11:14:15PM -0700, Harshit Mogalapalli wrote:
> Smatch reports:
> 	drivers/char/tpm/tpm-interface.c:470 tpm_init() error:
> 	'tpm_class' dereferencing possible ERR_PTR()
> 
> If class_create() returns error pointer, we are dereferencing a possible
> error pointer. Fix this by moving the dereference post error handling.
> 
> Fixes: a010eb881243 ("tpm: fix up the tpm_class shutdown_pre pointer when created")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
> ---
> This is based on static analysis, only compile tested.

Thanks for this, good catch, I've queued it up in my tree now as I have
the offending change that caused this.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ