USB: iowarrior: fix NULL-deref in write
authorJohan Hovold <johan@kernel.org>
Tue, 7 Mar 2017 15:11:04 +0000 (16:11 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 18 Jul 2017 17:38:31 +0000 (18:38 +0100)
commitcc36c4c5510d8b36d5971ecab4e056e85efe4ad1
tree1516dc416e26b0bc7b9f80bb4ace302f5f792740
parent09a35388674766254ece34cbfbbf71afae852745
USB: iowarrior: fix NULL-deref in write

commit de46e56653de7b3b54baa625bd582635008b8d05 upstream.

Make sure to verify that we have the required interrupt-out endpoint for
IOWarrior56 devices to avoid dereferencing a NULL-pointer in write
should a malicious device lack such an endpoint.

Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/misc/iowarrior.c