android_kernel_oneplus_msm8998/drivers/usb/usbip
Shuah Khan 1a2018a7ed usbip: fix 3eee23c3ec14 tcp_socket address still in the status file
Commit 3eee23c3ec14 ("usbip: prevent vhci_hcd driver from leaking a
socket pointer address") backported the following commit from mailine.
However, backport error caused the tcp_socket address to still leak.

commit 2f2d0088eb93 ("usbip: prevent vhci_hcd driver from leaking a
socket pointer address")

When a client has a USB device attached over IP, the vhci_hcd driver is
locally leaking a socket pointer address via the

/sys/devices/platform/vhci_hcd/status file (world-readable) and in debug
output when "usbip --debug port" is run.

Fix it to not leak. The socket pointer address is not used at the moment
and it was made visible as a convenient way to find IP address from
socket pointer address by looking up /proc/net/{tcp,tcp6}.

As this opens a security hole, the fix replaces socket pointer address
with sockfd.

Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:09:36 +01:00
..
Kconfig
Makefile
README
stub.h
stub_dev.c usbip: prevent leaking socket pointer address in messages 2018-01-31 12:06:12 +01:00
stub_main.c usbip: stub: stop printing kernel pointer addresses in messages 2018-01-02 20:33:26 +01:00
stub_rx.c usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input 2018-01-31 12:06:12 +01:00
stub_tx.c usbip: stub: stop printing kernel pointer addresses in messages 2018-01-02 20:33:26 +01:00
usbip_common.c usbip: prevent leaking socket pointer address in messages 2018-01-31 12:06:12 +01:00
usbip_common.h usbip: prevent vhci_hcd driver from leaking a socket pointer address 2018-01-31 12:06:07 +01:00
usbip_event.c usb: usbip: Fix possible deadlocks reported by lockdep 2018-01-31 12:06:11 +01:00
usbip_protocol.txt
vhci.h
vhci_hcd.c usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit 2018-02-16 20:09:36 +01:00
vhci_rx.c usb: usbip: Fix possible deadlocks reported by lockdep 2018-01-31 12:06:11 +01:00
vhci_sysfs.c usbip: fix 3eee23c3ec14 tcp_socket address still in the status file 2018-02-16 20:09:36 +01:00
vhci_tx.c usb: usbip: Fix possible deadlocks reported by lockdep 2018-01-31 12:06:11 +01:00

TODO:
	- more discussion about the protocol
	- testing
	- review of the userspace interface
	- document the protocol

Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>