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]
Date:   Mon, 25 Apr 2022 10:38:12 +0200
From:   Alexandra Winter <wintera@...ux.ibm.com>
To:     "Colin King (gmail)" <colin.i.king@...il.com>,
        Wenjia Zhang <wenjia@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>
Cc:     Christian Borntraeger <borntraeger@...ux.ibm.com>,
        linux-s390@...r.kernel.org,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: ctcm: rename READ/WRITE defines to avoid redefinitions



On 24.04.22 20:58, Colin King (gmail) wrote:
> Hi,
> 
> static analysis with cppcheck detected a potential null pointer deference with the following commit:
> 
> commit 3c09e2647b5e1f1f9fd383971468823c2505e1b0
> Author: Ursula Braun <ursula.braun@...ibm.com>
> Date:   Thu Aug 12 01:58:28 2010 +0000
> 
>     ctcm: rename READ/WRITE defines to avoid redefinitions
> 
> 
> The analysis is as follows:
> 
> drivers/s390/net/ctcm_sysfs.c:43:8: note: Assuming that condition 'priv' is not redundant
>  if (!(priv && priv->channel[CTCM_READ] && ndev)) {
>        ^
> drivers/s390/net/ctcm_sysfs.c:42:9: note: Null pointer dereference
>  ndev = priv->channel[CTCM_READ]->netdev;
> 
> The code in question is as follows:
> 
>         ndev = priv->channel[CTCM_READ]->netdev;
> 
>         ^^ priv may be null, as per check below but it is being dereferenced when assigning ndev
> 
>         if (!(priv && priv->channel[CTCM_READ] && ndev)) {
>                 CTCM_DBF_TEXT(SETUP, CTC_DBF_ERROR, "bfnondev");
>                 return -ENODEV;
>         }
> 
> Colin

Thank you very much for reporting this, we will provide a patch.

Do you have any special requests for the Reported-by flag? Or is
Reported-by: Colin King (gmail) <colin.i.king@...il.com>
fine with you?

Kind regards
Alexandra

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ