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>
Wed, 23 Sep 2015 19:15:19 +0000 (12:15 -0700)
commitcbb4be652d374f64661137756b8f357a1827d6a4
tree762454d9669951c2cd6b8f23cc1bd6192c8f42d3
parentcc8e4fc0c3b5e8340bc8358990515d116a3c274c
USB: whiteheat: fix potential null-deref at probe

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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/whiteheat.c