• Johan Hovold's avatar
    USB: serial: oti6858: fix NULL-deref at open · 390eb6e1
    Johan Hovold authored
    commit 5afeef23 upstream.
    
    Fix NULL-pointer dereference in open() should the device lack the
    expected endpoints:
    
    Unable to handle kernel NULL pointer dereference at virtual address 00000030
    ...
    PC is at oti6858_open+0x30/0x1d0 [oti6858]
    
    Note that a missing interrupt-in endpoint would have caused open() to
    fail.
    
    Fixes: 49cdee0e
    
     ("USB: oti6858 usb-serial driver (in Nokia CA-42
    cable)")
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    [bwh: Backported to 3.2: add this check to the existing
     usb_serial_driver::attach implementation]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    390eb6e1
oti6858.c 28 KB