]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: chipidea: debug: avoid out of bound read
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 28 Apr 2015 17:30:47 +0000 (19:30 +0200)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 May 2015 14:26:59 +0000 (16:26 +0200)
commitfb6af6cb768a33df9ecc7ace4481da155396bd04
treeac10662135574874a51138ed5018e035711d9fb9
parentae35eaa4844b87826202fb4ccd3483586d64c2d7
usb: chipidea: debug: avoid out of bound read

commit bd5fb0aec3dd7cde7ec4c397b10e55d4c9626d8d upstream.

A string written by the user may not be zero terminated.

sscanf may read memory beyond the buffer if no zero byte
is found.

For testing build with CONFIG_USB_CHIPIDEA=y, CONFIG_USB_CHIPIDEA_DEBUG=y.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/usb/chipidea/debug.c