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>
Mon, 19 Mar 2018 07:42:46 +0000 (08:42 +0100)
commit59b0613d3f40f0ba621bb9c7ddf06dea2948e0b7
tree4a5fee559e8755f4f444377754ebb57a0e2cc256
parent42b8dfefbb1b4b49e028aeb5bbbcf41f1028756e
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