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: <4B2FDE9F.1070108@hartkopp.net>
Date:	Mon, 21 Dec 2009 21:46:23 +0100
From:	Oliver Hartkopp <socketcan@...tkopp.net>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	Alexander Strakh <strakh@...ras.ru>,
	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Donald Becker <becker@...ld.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] 3c507.c: remove unused NULL pointer check

Stephen Hemminger wrote:
> On Mon, 21 Dec 2009 17:56:39 +0100
> Oliver Hartkopp <socketcan@...tkopp.net> wrote:
> 
>> Alexander Strakh wrote:
>>> 	In driver drivers/net/3c507.c in function Iirqreturn_t el16_interrupt:
>>> 1. If in line 555 dev = NULL then we goto line 556
>>> 2. In line 556 we have null dereference because pr_err called with dev->name 
>>> in third parameter.
>>>  555        if (dev == NULL) {
>>>  556                pr_err("%s: net_interrupt(): irq %d for unknown device.
>>> \n",
>>>  557                        dev->name, irq);
>>>  558                return IRQ_NONE;
>>>  559        }
>>>
>>> Found by Linux Device Drivers Verification (Svace detector)
>>>
>>> Remove unused NULL pointer check.

> 
> Interrupts will never be called with third parameter of NULL. It is really
> bogus impossible to reach code.
> 

You're right! I just did not verify the direct assignment of dev = dev_id ...

Btw. the description for the reason of this patch remains unsuitably as the
problem is not the potential dereferencing of dev->name in pr_err() here.

It should better be something like this (partly stolen from your answer):

   Interrupts will never be called with dev_id parameter of NULL.
   This patch removes the obsolete, unreachable code.

Regards,
Oliver



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ