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]
Message-ID: <20211118150937.GP27562@kadam>
Date:   Thu, 18 Nov 2021 18:09:37 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Johan Hovold <johan@...nel.org>
Cc:     Pavel Skripkin <paskripkin@...il.com>, aelior@...vell.com,
        skalluru@...vell.com, GR-everest-linux-l2@...vell.com,
        davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: bnx2x: fix variable dereferenced before check

On Thu, Nov 18, 2021 at 09:51:57AM +0100, Johan Hovold wrote:
> [ Adding Dan. ]
> 
> On Sun, Nov 14, 2021 at 01:36:36AM +0300, Pavel Skripkin wrote:
> > Smatch says:
> > 	bnx2x_init_ops.h:640 bnx2x_ilt_client_mem_op()
> > 	warn: variable dereferenced before check 'ilt' (see line 638)
> > 
> > Move ilt_cli variable initialization _after_ ilt validation, because
> > it's unsafe to deref the pointer before validation check.
> 
> It seems smatch is confused here. There is no dereference happening
> until after the check, we're just determining the address when
> initialising ilt_cli.

Yep.  You're right.  I will fix this.  I've written a fix and I'll test
it tonight.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ