[PATCH] usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten

2018-10-18 Thread Shuah Khan (Samsung OSG)
platform_device_del() instead and let put_vudc_device() do the platform_device_put(). Reported-by: Randy Dunlap Signed-off-by: Shuah Khan (Samsung OSG) Cc: --- drivers/usb/usbip/vudc_main.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/usbip

[PATCH] usb: usbip: Fix BUG: KASAN: slab-out-of-bounds in vhci_hub_control()

2018-10-05 Thread Shuah Khan (Samsung OSG)
reproduce the problem and verify the fix: C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ed8ab640 Reported-by: syzbot+bccc1fe10b70fadc7...@syzkaller.appspotmail.com Signed-off-by: Shuah Khan (Samsung OSG) --- drivers/usb/usbip/vhci_hcd.c | 57

[PATCH] selftests: usbip: add wait after attach and before checking port status

2018-10-05 Thread Shuah Khan (Samsung OSG)
Add sleep between attach and "usbip port" check to make sure status is updated. Running attach and query back shows incorrect status. Signed-off-by: Shuah Khan (Samsung OSG) --- tools/testing/selftests/drivers/usb/usbip/usbip_test.sh | 4 1 file changed, 4 insertions(+) diff --g

[PATCH] usbip: usbip_host: fix bad unlock balance during stub_probe()

2018-05-15 Thread Shuah Khan (Samsung OSG)
22076557b07c ("usbip: usbip_host: fix NULL-ptr deref and use-after-free errors") in usb-linus Signed-off-by: Shuah Khan (Samsung OSG) --- drivers/usb/usbip/stub_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/

[PATCH] usbip: usbip_host: fix NULL-ptr deref and use-after-free errors

2018-05-14 Thread Shuah Khan (Samsung OSG)
stub_device_rebind() call put_busid_priv() to release the busid lock before returning. This changes fixes the unprotected code paths eliminating the race conditions in updating the busid entries. Signed-off-by: Shuah Khan (Samsung OSG) --- drivers/usb/usbip/stub.h | 2 ++ drivers/usb/usbip

[REBASED PATCH 2/2] usbip: usbip_host: run rebind from exit when module is removed

2018-04-30 Thread Shuah Khan (Samsung OSG)
the devices to their original drivers. This includes cleanup changes and moving device_attach() code to a common routine to be called from rebind_store() and usbip_host_exit(). Signed-off-by: Shuah Khan (Samsung OSG) --- drivers/usb/usbip/stub_dev.c | 6 + drivers/usb/usbip/stub_main.c

[REBASED PATCH 1/2] usbip: usbip_host: delete device from busid_table after rebind

2018-04-30 Thread Shuah Khan (Samsung OSG)
. Signed-off-by: Shuah Khan (Samsung OSG) --- drivers/usb/usbip/stub_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c index d41d0cdeec0f..fb46bd62d538 100644 --- a/drivers/usb/usbip/stub_main.c +++ b/drivers/usb/usbip