usb: usbmon: Read text within supplied buffer size
authorPete Zaitcev <zaitcev@kotori.zaitcev.us>
Fri, 9 Mar 2018 06:21:14 +0000 (00:21 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Mar 2018 10:18:56 +0000 (11:18 +0100)
commit63f3bac3bedcf415d789ff3ae8fb1361e4ab104e
treea4ef907bf03d98bcc9d4620521e215af7945544a
parentb2708e1e30e02ef4170266d20d90774cce4419e8
usb: usbmon: Read text within supplied buffer size

commit a5f596830e27e15f7a0ecd6be55e433d776986d8 upstream.

This change fixes buffer overflows and silent data corruption with the
usbmon device driver text file read operations.

Signed-off-by: Fredrik Noring <noring@nocrew.org>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mon/mon_text.c