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

commit 5654699fb38512bdbfc0f892ce54fce75bdc2bab upstream.

Make sure to verify the number of ports requested by subdriver to avoid
writing beyond the end of fixed-size array in interface data.

The current usb-serial implementation is limited to eight ports per
interface but failed to verify that the number of ports requested by a
subdriver (which could have been determined from device descriptors) 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