USB: serial: io_edgeport: add missing active-port sanity check
authorJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 09:50:24 +0000 (10:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:22:34 +0000 (08:22 +0100)
commit04f4a098d21b72dc0782bfc21acde5be244f20ad
treea00ca9047186089112e7e7f590a73d8021d33c9e
parent3e8e0296c6f9a939d1214a6878733d0ed187a962
USB: serial: io_edgeport: add missing active-port sanity check

commit 1568c58d11a7c851bd09341aeefd6a1c308ac40d upstream.

The driver receives the active port number from the device, but never
made sure that the port number was valid. This could lead to a
NULL-pointer dereference or memory corruption in case a device sends
data for an invalid port.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/io_edgeport.c