]> git.karo-electronics.de Git - linux-beck.git/commit
USB: serial: mos7840: fix another NULL-deref at open
authorJohan Hovold <johan@kernel.org>
Thu, 9 Feb 2017 11:11:41 +0000 (12:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Feb 2017 10:10:51 +0000 (11:10 +0100)
commit308a96c857ccba6aaebfdc4c63045cb2970de0fb
tree67bbb86420612681989f127f55a1f9f1856ebf6e
parent9ab870e7425c224328ec5807ed916d417810b2eb
USB: serial: mos7840: fix another NULL-deref at open

commit 5182c2cf2a9bfb7f066ef0bdd2bb6330b94dd74e upstream.

Fix another NULL-pointer dereference at open should a malicious device
lack an interrupt-in endpoint.

Note that the driver has a broken check for an interrupt-in endpoint
which means that an interrupt URB has never even been submitted.

Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7840.c