]> git.karo-electronics.de Git - linux-beck.git/commit
usb: gadget: f_fs: Assorted buffer overflow checks.
authorVincent Pelletier <plr.vincent@gmail.com>
Wed, 18 Jan 2017 00:57:44 +0000 (00:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 07:08:30 +0000 (08:08 +0100)
commit12a9c11c2e198ae879a321f8c3b5a2df73f8424f
treec8213bc6dd1047b6ecf35977444a4a2f59724830
parente40d15fce9293acc04db76546edc2689780961af
usb: gadget: f_fs: Assorted buffer overflow checks.

commit 83e526f2a2fa4b2e82b6bd3ddbb26b70acfa8947 upstream.

OS descriptor head, when flagged as provided, is accessed without
checking if it fits in provided buffer. Verify length before access.
Also, there are other places where buffer length it checked
after accessing offsets which are potentially past the end. Check
buffer length before as well to fail cleanly.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_fs.c