]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:31 +0000 (19:03 +0100)
commit12cd5dd09950850b53eb46569356880f3c27d1b7
tree5a335a3e2ccf1a05a591d818d438bdd9ad9dcb60
parent2e776d31365e5cbc8ec9001501de90d1fc4003e9
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")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/io_edgeport.c