* BUG null dereference in driver ./drivers/isdn/icn/icn.c
@ 2009-12-15 17:55 Alexander Strakh
2009-12-15 14:20 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Strakh @ 2009-12-15 17:55 UTC (permalink / raw)
To: Fritz Elfert, Karsten Keil, Armin Schindler, linux-kernel
KERNEL_VERSION: 2.6.32
SUBJECT: null dereference after check
DESCRIBE:
In driver ./drivers/isdn/icn/icn.c in function icn_addcard:
1. If in line 1580 card2 = NULL then we goto line 1581
2. In line 1581 we have null dereference because printk called with card2-
>interface.id in third parameter.
1580 if (!(card2 = icn_initcard(port, id2))) {
1581 printk(KERN_INFO
1582 "icn: (%s) half ICN-4B, port 0x%x added\n",
1583 card2->interface.id, port);
1584 return 0;
1585 }
Found by Linux Device Drivers Verification Project (Svace Detector)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: BUG null dereference in driver ./drivers/isdn/icn/icn.c
2009-12-15 17:55 BUG null dereference in driver ./drivers/isdn/icn/icn.c Alexander Strakh
@ 2009-12-15 14:20 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-12-15 14:20 UTC (permalink / raw)
To: Alexander Strakh
Cc: Fritz Elfert, Karsten Keil, Armin Schindler, linux-kernel
On Tuesday 15 December 2009 06:55:06 pm Alexander Strakh wrote:
> KERNEL_VERSION: 2.6.32
> SUBJECT: null dereference after check
> DESCRIBE:
> In driver ./drivers/isdn/icn/icn.c in function icn_addcard:
>
> 1. If in line 1580 card2 = NULL then we goto line 1581
> 2. In line 1581 we have null dereference because printk called with card2-
> >interface.id in third parameter.
>
> 1580 if (!(card2 = icn_initcard(port, id2))) {
> 1581 printk(KERN_INFO
> 1582 "icn: (%s) half ICN-4B, port 0x%x added\n",
> 1583 card2->interface.id, port);
> 1584 return 0;
> 1585 }
After reading icn_addcard() it seems like the code was meant to use
'card' not 'card2' there.
--
Bartlomiej Zolnierkiewicz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-15 14:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 17:55 BUG null dereference in driver ./drivers/isdn/icn/icn.c Alexander Strakh
2009-12-15 14:20 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox