USB: visor: fix null-deref at probe
authorJohan Hovold <johan@kernel.org>
Tue, 12 Jan 2016 11:05:20 +0000 (12:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Mar 2016 13:25:39 +0000 (14:25 +0100)
commitea26131ff39cf3517a784672368ad17fbdeba5eb
tree0be37076bb7f7e4f3a2f2f7752ed6e2593071dc4
parent9b583e2a0ef3f3c2e0fc227ed1b4bd1dfe4ba834
USB: visor: fix null-deref at probe

commit cac9b50b0d75a1d50d6c056ff65c005f3224c8e0 upstream.

Fix null-pointer dereference at probe should a (malicious) Treo device
lack the expected endpoints.

Specifically, the Treo port-setup hack was dereferencing the bulk-in and
interrupt-in urbs without first making sure they had been allocated by
core.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/serial/visor.c