]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 1 Mar 2017 19:27:41 +0000 (20:27 +0100)
commit082a7236ca46d594db12129bfa519a61ad513f3a
treede803c353a455bb55fa97d52cbeec6091ea0e975
parent18232b24595d484b64a1af6f91d0f666cca321ed
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: Jiri Slaby <jslaby@suse.cz>
drivers/usb/serial/mos7840.c