USB: mct_u232: add sanity checking in probe
authorOliver Neukum <oneukum@suse.com>
Thu, 31 Mar 2016 16:04:24 +0000 (12:04 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:05:22 +0000 (00:05 +0200)
commitb323f6de337f4904272172958322b5f2bf50984d
treec086e70299dce4d7f259b5dd780865fb25e276c7
parent7836b6be3ecf04a48076892e8dfa445e5349ad64
USB: mct_u232: add sanity checking in probe

commit 4e9a0b05257f29cf4b75f3209243ed71614d062e upstream.

An attack using the lack of sanity checking in probe is known. This
patch checks for the existence of a second port.

CVE-2016-3136

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
[johan: add error message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: put the check in mct_u232_startup(), which already
 has a 'serial' variable]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/mct_u232.c