]> git.baikalelectronics.ru Git - kernel.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)
committerJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 15:22:57 +0000 (16:22 +0100)
commit7a92049828d6e1d53e9b1e9308d1b4e0c08017d8
tree2fcd69910b423be66e00fac67f5b4b3b1e1fc6aa
parent8693a09ceb0329c07c4eed1281e0ecfea44bc45f
USB: serial: io_edgeport: add missing active-port sanity check

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>
drivers/usb/serial/io_edgeport.c