]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: serial: fix potential stack buffer overflow
authorJohan Hovold <johan@kernel.org>
Wed, 27 Aug 2014 09:55:18 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 20:40:57 +0000 (13:40 -0700)
commiteb587be4394fd4a770206d08689f42ca5453692d
tree5ce1662198d249a9ad97b4332769f2546896d3d0
parent133f1fc755c60a3e4b946e63accb11fe0577be18
USB: serial: fix potential stack buffer overflow

commit d979e9f9ecab04c1ecca741370e30a8a498893f5 upstream.

Make sure to verify the maximum number of endpoints per type to avoid
writing beyond the end of a stack-allocated array.

The current usb-serial implementation is limited to eight ports per
interface but failed to verify that the number of endpoints of a certain
type reported by a device did not exceed this limit.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/usb-serial.c