Skip to contentSkip to conversation

BUG null dereference in driver ./drivers/usb/serial/mos7840.c

DISCUSSION Alexander Strakh 2 participants 2 messages Dec 21, 2009

lore
Share & tools
lore
#0 lore raw

KERNEL_VERSION: 2.6.32
SUBJECT: null derefernce in function mos7840_bulk_in_callback SUBSCRIBE:
In driver drivers/usb/serial/mos7840.c in function
mos7840_bulk_in_callback:

1. If in line 697 mos7840_port = NULL then we goto line 699
2. In line 699 we have null dereference.

696 mos7840_port = urb->context;
697 if (!mos7840_port) {

 698                 dbg("%s", "NULL mos7840_port pointer");
 699                 mos7840_port->read_urb_busy = false;
 700                 return;

701 }

Found by Linux Device Drivers Verification Project (Svace Detector)

#1 lore raw
Quoted 7 lines · Alexander Strakh

KERNEL_VERSION: 2.6.32
SUBJECT: null derefernce in function mos7840_bulk_in_callback SUBSCRIBE:
In driver drivers/usb/serial/mos7840.c in function
mos7840_bulk_in_callback:

1. If in line 697 mos7840_port = NULL then we goto line 699

How can that happen?

Quoted 10 lines

2. In line 699 we have null dereference.

696 mos7840_port = urb->context;
697 if (!mos7840_port) {

 698                 dbg("%s", "NULL mos7840_port pointer");
 699                 mos7840_port->read_urb_busy = false;
 700                 return;

701 }

Found by Linux Device Drivers Verification Project (Svace Detector)

What is this?

Are you also going to send patches for stuff like this?

thanks,

greg k-h