linux/drivers/staging/usbip
Shuah Khan 6fa8179fc9 usbip: stub_rx: fix static checker warning on unnecessary checks
commit 10c9012093 upstream.

Fix the following static checker warnings:

The patch c6688ef9f2: "usbip: fix stub_rx: harden CMD_SUBMIT path
to handle malicious input" from Dec 7, 2017, leads to the following
static checker warning:

    drivers/usb/usbip/stub_rx.c:346 get_pipe()
    warn: impossible condition
'(pdu->u.cmd_submit.transfer_buffer_length > ((~0 >> 1))) =>
(s32min-s32max > s32max)'
    drivers/usb/usbip/stub_rx.c:486 stub_recv_cmd_submit()
    warn: always true condition
'(pdu->u.cmd_submit.transfer_buffer_length <= ((~0 >> 1))) =>
(s32min-s32max <= s32max)'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-11-20 18:06:00 +00:00
..
uapi staging/usbip: add uapi header to export usbip kernel interfaces 2014-03-04 16:12:14 -08:00
userspace usbip: list: don't list devices attached to vhci_hcd 2018-06-16 22:21:58 +01:00
Kconfig Kconfig: Remove useless "default N" lines 2014-02-20 14:38:06 +01:00
Makefile staging: usbip: edit Kconfig and rename CONFIG options 2011-05-12 09:17:57 -07:00
README staging: usbip: README: we need to document the protocol 2011-06-07 14:08:51 -07:00
stub.h usbip: usbip_host: fix NULL-ptr deref and use-after-free errors 2018-09-25 23:47:23 +01:00
stub_dev.c usbip: usbip_host: fix NULL-ptr deref and use-after-free errors 2018-09-25 23:47:23 +01:00
stub_main.c usbip: usbip_host: fix bad unlock balance during stub_probe() 2018-09-25 23:47:23 +01:00
stub_rx.c usbip: stub_rx: fix static checker warning on unnecessary checks 2018-11-20 18:06:00 +00:00
stub_tx.c usbip: stub: stop printing kernel pointer addresses in messages 2018-03-03 15:52:02 +00:00
usbip_common.c usbip: remove kernel addresses from usb device and urb debug msgs 2018-03-03 15:52:11 +00:00
usbip_common.h usbip: vhci_hcd: Fix usb device and sockfd leaks 2018-10-21 08:45:35 +01:00
usbip_event.c staging: usbip: Renaming pr_warning function 2013-05-13 13:39:31 -07:00
usbip_protocol.txt staging: Fix typo in multiple files 2012-04-10 10:31:01 -07:00
vhci.h staging: usbip: remove unnused, broken macro 2013-04-05 14:22:50 -07:00
vhci_hcd.c usbip: vhci_hcd: check rhport before using in vhci_hub_control() 2018-10-21 08:45:34 +01:00
vhci_rx.c usbip: vhci: stop printing kernel pointer addresses in messages 2018-03-03 15:52:02 +00:00
vhci_sysfs.c usbip: prevent vhci_hcd driver from leaking a socket pointer address 2018-02-13 18:42:32 +00:00
vhci_tx.c usbip: vhci: stop printing kernel pointer addresses in messages 2018-03-03 15:52:02 +00: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>