android_kernel_sony_sdm845/tools/usb/usbip/libsrc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathan Dieter 69e78e7214 usbip: Fix potential format overflow in userspace tools
commit e5dfa3f902b9a642ae8c6997d57d7c41e384a90b upstream.

The usbip userspace tools call sprintf()/snprintf() and don't check for
the return value which can lead the paths to overflow, truncating the
final file in the path.

More urgently, GCC 7 now warns that these aren't checked with
-Wformat-overflow, and with -Werror enabled in configure.ac, that makes
these tools unbuildable.

This patch fixes these problems by replacing sprintf() with snprintf() in
one place and adding checks for the return value of snprintf().

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-31 12:55:50 +01:00
..
list.h Replace mentions of "list_struct" to "list_head" 2014-11-20 14:45:15 +01:00
Makefile.am usbip: tools: Add vudc backend to usbip tools 2016-04-26 15:19:50 -07:00
names.c
names.h
sysfs_utils.c
sysfs_utils.h
usbip_common.c usbip: Fix potential format overflow in userspace tools 2018-01-31 12:55:50 +01:00
usbip_common.h usbip: tools: Add vudc backend to usbip tools 2016-04-26 15:19:50 -07:00
usbip_device_driver.c usbip: tools: Add vudc backend to usbip tools 2016-04-26 15:19:50 -07:00
usbip_device_driver.h usbip: tools: Add vudc backend to usbip tools 2016-04-26 15:19:50 -07:00
usbip_host_common.c usbip: Fix potential format overflow in userspace tools 2018-01-31 12:55:50 +01:00
usbip_host_common.h usbip: tools: Extract generic code to be shared with vudc backend 2016-04-26 15:19:50 -07:00
usbip_host_driver.c usbip: tools: Extract generic code to be shared with vudc backend 2016-04-26 15:19:50 -07:00
usbip_host_driver.h usbip: tools: Extract generic code to be shared with vudc backend 2016-04-26 15:19:50 -07:00
vhci_driver.c usbip: prevent vhci_hcd driver from leaking a socket pointer address 2018-01-31 12:55:50 +01:00
vhci_driver.h