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, 2 Jan 2019 15:01:13 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] drivers: base: swnode: check if swnode is null
 before dereferencing it

On Sat, Dec 22, 2018 at 12:43:33PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The macro to_software_mode can potentially return NULL, so also add
> a null check on the swnode before dereferencing it to avoid any null
> pointer dereferences.
> 
> Detected by CoverityScan, CID#1476052 ("Explicit null dereferenced")
> 
> Fixes: 59abd83672f7 ("drivers: base: Introducing software nodes to the firmware node framework")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

to_software_mode() can't return NULL though...

We shouldn't change the code just to make the static checker happy.

Sometimes if we just silence every static checker warning maybe we will
fix some bugs in the middle of silencing all the false positive, but
Smatch is almost at the stage of being able to parse this code
correctly.  Maybe by the end of the year.  So let's hold off and then
think about taking the fix everything approach next year.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ