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: <47757327-f6df-9146-03a1-2b32b23a37e6@web.de>
Date:   Mon, 16 Dec 2019 09:43:43 +0100
From:   Markus Elfring <Markus.Elfring@....de>
To:     Aditya Pakki <pakki001@....edu>,
        linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Chas Williams <3chas3@...il.com>, Kangjie Lu <kjlu@....edu>
Subject: Re: [PATCH] fore200e: Fix incorrect checks of NULL pointer
 dereference

> The patch fixes these issues by avoiding NULL pointer dereferences.

I suggest to choose a better wording for this change description.

Will the tag “Fixes” become helpful here?


…
> +++ b/drivers/atm/fore200e.c
…
> @@ -1480,9 +1482,18 @@ fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
…
> +    fore200e = FORE200E_DEV(vcc->dev);
> +    fore200e_vcc = FORE200E_VCC(vcc);
> +
> +    if (!fore200e)
> +        return -EINVAL;
> +
> +    txq = &fore200e->host_txq;
> +    if (!fore200e_vcc)
> +        return -EINVAL;
>
>      if (!test_bit(ATM_VF_READY, &vcc->flags)) {
…


Can the following adjustment be nicer?

+    fore200e_vcc = FORE200E_VCC(vcc);
+    if (!fore200e_vcc)
+        return -EINVAL;
+
+    fore200e = FORE200E_DEV(vcc->dev);
+    if (!fore200e)
+        return -EINVAL;
+
+    txq = &fore200e->host_txq;


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ