USB: whiteheat: fix potential null-deref at probe
authorJohan Hovold <johan@kernel.org>
Wed, 23 Sep 2015 18:41:42 +0000 (11:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:37:51 +0000 (14:37 -0700)
commit0bccecfc32cb896d49ebd226b22cf6bfed45b35d
treec551754eac657cbd5365645e2bf18cc62c84df43
parent253db046eb2812dfe976203394e51f1a36fcbc67
USB: whiteheat: fix potential null-deref at probe

commit cbb4be652d374f64661137756b8f357a1827d6a4 upstream.

Fix potential null-pointer dereference at probe by making sure that the
required endpoints are present.

The whiteheat driver assumes there are at least five pairs of bulk
endpoints, of which the final pair is used for the "command port". An
attempt to bind to an interface with fewer bulk endpoints would
currently lead to an oops.

Fixes CVE-2015-5257.

Reported-by: Moein Ghasemzadeh <moein@istuary.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/whiteheat.c