On 5/23/19 1:13 AM, Greg Kroah-Hartman wrote:
On Thu, May 23, 2019 at 01:58:01AM +0800, kbuild test robot wrote:
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
usb-linus
branch HEAD: c1a145a3ed9a40f3b6145feb97789e8eb49c5566 xhci: Use %zu for
printing size_t type
Cleanup do_rebind() return path and use common return path.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/stub_main.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c
index bf8a5feb0ee9..2e4bfccd4bfc
Add a sleep between detach and check for exportable devices to avoid
the following segfault from libc-2.27.so
[ 6268.136108] usbip[5565]: segfault at 0 ip 7f2a947bddfd sp
7ffd1a8705e8 error 4 in libc-2.27.so[7f2a94703000+1e7000]
Signed-off-by: Shuah Khan
---
tools/testing/selftests
Fix vep_free_request() to return when usb_ep and usb_request are null
instead of calling WARN_ON.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vudc_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
index
Fix vhci_urb_enqueue() to print debug msg and return error instead of
failing with BUG_ON.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_hcd.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index
From: Shuah Khan
Fix vep_free_request() to return when usb_ep and usb_request are null
instead of calling WARN_ON.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vudc_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip
From: Shuah Khan
Fix vhci_urb_enqueue() to print error and return error instead of
failing with WARN_ON.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_hcd.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip
close(fd);
> return -1;
> }
>
> - value = atoi(&status);
> + value = atoi(status);
>
> return value;
> }
>
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
thanks,
-- Shuah
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
On 10/13/2018 11:37 AM, Randy Dunlap wrote:
> Kernel 4.19-rc7, on x86_64:
>
> Load usbip_vudc module, then unload (rmmod) it.
> Load it again:
>
Thanks Randy. I am debugging another problem in this path and I will
take a look at this one as well. Just quick ack that I saw this.
Thanks for repor
Hi Ben,
Thanks for the patch.
On 10/10/2018 11:30 PM, Ben Hutchings wrote:
> Commit 5b22f676118f "usbip: vhci_hcd: check rhport before using in
> vhci_hub_control()" added some validation of rhport, but left
> several problems:
>
> - If VHCI_HC_PORTS < 256, we can get rhport >= VHCI_HC_PORTS whi
On 10/10/2018 01:42 PM, Dmitry Vyukov wrote:
> On Tue, Oct 2, 2018 at 6:04 PM, Shuah Khan wrote:
>> On 09/04/2018 12:52 PM, syzbot wrote:
>>> Hello,
>>>
>>> syzbot found the following crash on:
>>>
>>> HEAD commit:420f51f4ab6b Merge
On 10/08/2018 02:01 PM, Sudip Mukherjee wrote:
> On Mon, Oct 8, 2018 at 8:29 PM Shuah Khan wrote:
>>
>> Hi Sudip,
>>
>> On 10/08/2018 01:19 PM, Sudip Mukherjee wrote:
>>> From: Sudip Mukherjee
>>>
>>> The port number is checked and it just
Hi Sudip,
On 10/08/2018 01:19 PM, Sudip Mukherjee wrote:
> From: Sudip Mukherjee
>
> The port number is checked and it just prints an error message but it
> still continues to use the invalid port. And as a result it accesses
> memory which is not its resulting in BUG report from KASAN.
Yes th
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
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
On 10/02/2018 10:42 AM, Dmitry Vyukov wrote:
> On Tue, Oct 2, 2018 at 6:04 PM, Shuah Khan wrote:
>> On 09/04/2018 12:52 PM, syzbot wrote:
>>> Hello,
>>>
>>> syzbot found the following crash on:
>>>
>>> HEAD commit:420f51f4ab6b Merge
On 09/04/2018 12:52 PM, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: 420f51f4ab6b Merge tag 'arm64-fixes' of git://git.kernel.o..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=126a6f0e40
> kernel config: https://
chine.
>
> See also:
> https://bugzilla.redhat.com/show_bug.cgi?id=1631148
>
> Cc: Jonathan Dieter
> Cc: Valentina Manea
> Cc: Shuah Khan
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Maciej Żenczykowski
> ---
> tools/usb/usbip/libsrc/vhci_driver.c | 2 +-
>
On 09/07/2018 10:14 AM, Dmitry Vyukov wrote:
> On Fri, Sep 7, 2018 at 6:03 PM, Shuah Khan wrote:
>> Hi Dmitry,
>>
>> On 09/07/2018 04:54 AM, Dmitry Vyukov wrote:
>>> Hi,
>>>
>>> I am getting the following error while booting kernel on upstream
>
Hi Dmitry,
On 09/07/2018 04:54 AM, Dmitry Vyukov wrote:
> Hi,
>
> I am getting the following error while booting kernel on upstream
> commit a49a9dcce802b3651013f659813df1361d306172, config is attached.
> Seems there is some kind of resource leak.
>
> Thanks
Odd. This commit has nothing to do w
On 07/26/2018 04:39 AM, Ben Hutchings wrote:
> On Tue, 2018-07-24 at 11:04 -0600, Shuah Khan wrote:
>> On 07/20/2018 08:12 PM, Ben Hutchings wrote:
>>> gcc 8 reports:
>>>
>>> usbip_device_driver.c: In function ‘read_usb_vudc_device’:
>>> usbip_devi
On 07/20/2018 08:12 PM, Ben Hutchings wrote:
> gcc 8 reports:
>
> usbip_device_driver.c: In function ‘read_usb_vudc_device’:
> usbip_device_driver.c:106:2: error: ‘strncpy’ specified bound 256 equals
> destination size [-Werror=stringop-truncation]
> strncpy(dev->path, path, SYSFS_PATH_MAX);
>
On 05/23/2018 03:22 AM, Michael Grzeschik wrote:
> As the amount of available ports varies by the kernels build
> configuration. To remove the limitation of the fixed 128 ports
> we allocate the amount of idevs by using the number we get
> from the kernel.
>
> Signed-off-by: Michael Grzeschik
> -
On 05/22/2018 11:04 AM, Michael Grzeschik wrote:
> As the amount of available ports varies by the kernels build
> configuration. To remove the limitation of the fixed 128 ports
> we allocate the amount of idevs by using the number we get
> from the kernel.
>
> Signed-off-by: Michael Grzeschik
> -
Hi Michael,
Thanks for the patch. Couple of comments below:
On 05/18/2018 08:39 AM, Michael Grzeschik wrote:
> As the amount of available ports varies by the kernels build
> configuration. To remove the limitation of the fixed 128 ports
> we allocate the amount of idevs by using the number we get
ed)
> +static int valid_args(__u32 *pdev_nr, __u32 *rhport,
> + enum usb_device_speed speed)
> {
> if (!valid_port(pdev_nr, rhport)) {
> return 0;
> @@ -322,7 +330,7 @@ static ssize_t attach_store(struct device *dev, struct
> device_att
On 05/18/2018 07:47 AM, Greg Kroah-Hartman wrote:
> On Thu, May 17, 2018 at 03:16:28PM -0500, Gustavo A. R. Silva wrote:
>> pdev_nr and rhport can be controlled by user-space, hence leading to
>> a potential exploitation of the Spectre variant 1 vulnerability.
>>
>> This issue was detected with the
On 05/15/2018 11:49 PM, Greg KH wrote:
> On Tue, May 15, 2018 at 05:57:23PM -0600, Shuah Khan (Samsung OSG) wrote:
>> stub_probe() calls put_busid_priv() in an error path when device isn't
>> found in the busid_table. Fix it by making put_busid_priv() safe to be
>&g
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/
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
On 04/30/2018 04:48 PM, Greg KH wrote:
> On Mon, Apr 30, 2018 at 04:17:19PM -0600, Shuah Khan (Samsung OSG) wrote:
>> Device is left in the busid_table after unbind and rebind. Rebind
>> initiates usb bus scan and the original driver claims the device.
>> After rescan the dev
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
.
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
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
---
drivers/usb/usbip/stub_dev.c | 6 +
drivers/usb/usbip/stub_main.c | 60
Refine probe and disconnect debug msgs to be useful and say what is
in progress.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/stub_dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c
index dd8ef36ab10e
.
Signed-off-by: Shuah Khan
---
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/stub_main.c
On 04/06/2018 02:01 AM, Sergei Shtylyov wrote:
> Hello!
>
> On 4/6/2018 1:31 AM, Shuah Khan wrote:
>
>> Validate !rhport < 0 before using it to access port_status array.
>
> Why '!'?
>
I should have explained it better in the commit log.
rhport is
Validate !rhport < 0 before using it to access port_status array.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_hcd.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 20e3d4609583..d11f3f8dad40 100
Fix it to not print kernel pointer address. Remove the conditional
and debug message as it isn't very useful.
Signed-off-by: Shuah Khan
Cc: stable
---
drivers/usb/usbip/usbip_event.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/usb/usbip/usbip_event.c b/drivers/usb/
usbip_host calls device_attach() without holding dev->parent lock.
Fix it.
Signed-off-by: Shuah Khan
Cc: stable
---
drivers/usb/usbip/stub_main.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c
index c31c8402a
On 04/05/2018 10:42 AM, Sasha Levin wrote:
> Hi.
>
> [This is an automated email]
>
> This commit has been processed by the -stable helper bot and determined
> to be a high probability candidate for -stable trees. (score: 13.1846)
>
> The bot has tested the following trees: v4.15.15, v4.14.32, v
On 04/05/2018 10:42 AM, Sasha Levin wrote:
> Hi.
>
> [This is an automated email]
>
> This commit has been processed by the -stable helper bot and determined
> to be a high probability candidate for -stable trees. (score: 10.6103)
>
> The bot has tested the following trees: v4.15.15, v4.14.32, v
On 04/04/2018 02:25 AM, Oliver Neukum wrote:
> Am Dienstag, den 03.04.2018, 09:56 -0600 schrieb Shuah Khan:
>> This is a virtual device associated to a real physical device on a different
>> system. My concern is that if the module gets removed accidentally then it
>> could
On 04/03/2018 12:56 AM, Greg KH wrote:
> On Mon, Apr 02, 2018 at 02:52:31PM -0600, Shuah Khan wrote:
>> vhci_hcd module can be removed even when devices are attached. Fix to
>> prevent module removal when devices are still attached.
>>
>> Signed-off-by: Shuah Khan
&
On 04/03/2018 12:56 AM, Greg KH wrote:
> On Mon, Apr 02, 2018 at 02:52:32PM -0600, Shuah Khan wrote:
>> vhci_hcd fails to do reset to put usb device and sockfd in the
>> module remove/stop paths. Fix the leak.
>>
>> Signed-off-by: Shuah Khan
>
> Should this
vhci_hcd fails to do reset to put usb device and sockfd in the
module remove/stop paths. Fix the leak.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/usbip/usbip_common.h b/drivers/usb/usbip
vhci_hcd module can be removed even when devices are attached. Fix to
prevent module removal when devices are still attached.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_sysfs.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/usb
: Shuah Khan
---
tools/usb/usbip/src/usbipd.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/tools/usb/usbip/src/usbipd.c b/tools/usb/usbip/src/usbipd.c
index f8ff735eb100..32864c52942d 100644
--- a/tools/usb/usbip/src/usbipd.c
+++ b/tools/usb/usbip/src/usbipd.c
Currently ST_OK and ST_NA are the only values used to communicate
status of a request from a client. Use new error codes to clearly
indicate what failed. For example, when client sends request to
import a device that isn't export-able, send ST_DEV_BUSY to the client.
Signed-off-by: Shuah
lient.
Existing defines are moved to a common header in libsrc to be included
in the libusbip_la-usbip_common.o to be used by all the usbip tools.
Supporting interface to print error strings is added to the common lib.
Signed-off-by: Shuah Khan
---
tools/usb/usbip/libsrc/usbip_common.c
)
- when a client requests a device that isn't exportable,
usbip attach -r server_name -b 3-10.4
usbip: error: Attach Request for 3-10.4 failed - Device not found
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_attach.c | 11 +--
tools/usb/usbip/src/usbip_list.c
uest for 3-10.4 failed - Device not found
Shuah Khan (3):
usbip: tools: add more error codes for usbip request/reply messages
usbip: usbip_host_common: Use new error codes to return request status
usbip: tools: change to use new error codes in server reply messages
tools/usb/usbip/libsrc
On 03/06/2018 01:35 AM, Salvador Fandiño wrote:
>
>
> On 03/06/2018 01:03 AM, Shuah Khan wrote:
>> On 03/05/2018 02:00 AM, Salvador Fandiño wrote:
>>> On 02/21/2018 01:35 AM, Shuah Khan wrote:
>>>> Hi Salvador,
>>>>
>>>> On 01/30/
On 03/05/2018 02:00 AM, Salvador Fandiño wrote:
> On 02/21/2018 01:35 AM, Shuah Khan wrote:
>> Hi Salvador,
>>
>> On 01/30/2018 01:36 AM, Salvador Fandino wrote:
>>> Let me start by explaining the problem that have motivated me to write
>>> this patche
On 02/27/2018 03:45 PM, Krzysztof Opasiak wrote:
>
>
> On 02/27/2018 11:23 PM, Shuah Khan wrote:
>> Attach device error message is cryptic and useless. Fix it to be
>> informative.
>>
>> Signed-off-by: Shuah Khan
>> ---
>> tools/usb/usbip/src/
Kernel and tool version mismatch message is cryptic. Fix it to be
informative.
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_network.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/usb/usbip/src/usbip_network.c
b/tools/usb/usbip/src/usbip_network.c
Attach device error message is cryptic and useless. Fix it to be
informative.
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_attach.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/usb/usbip/src/usbip_attach.c
b/tools/usb/usbip/src/usbip_attach.c
index
sfer_buffer_length > ((~0 >> 1))) =>
(s32min-s32max > s32max)'
drivers/staging/usbip/stub_rx.c:501 stub_recv_cmd_submit() warn: always
true condition '(pdu->u.cmd_submit.transfer_buffer_length <= ((~0 >>
1))) => (s32min-s32max <= s32max)'
Reported-
we don't have */
> - if (!udc || !udc->driver || !udc->pullup) {
> - dev_err(dev, "no device or gadget not bound");
> + if (!udc->driver || !udc->pullup) {
> + dev_err(dev, "gadget not bound");
> ret = -
Hi Salvador,
On 01/30/2018 01:36 AM, Salvador Fandino wrote:
> Let me start by explaining the problem that have motivated me to write
> this patches:
>
> I work on the QVD, a virtual desktop platform for Linux. This software
> runs Linux desktops (i.e. XFCE, KDE) and their applications inside LXC
arns 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().
Signed-off-by: Shuah
):
usb: usbip: Fix possible deadlocks reported by lockdep
Shuah Khan (8):
usbip: fix stub_rx: get_pipe() to validate endpoint number
usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input
usbip: prevent vhci_hcd driver from leaking a socket pointer address
usbip: Fix
e, leaving device unusable by the client. The device is still
attached and however client can't use it.
The problem was fixed as part of larger change to add USB3 Super Speed
support.
This patch isolates the one line fix to clear the USB_PORT_STAT_POWER
from the original patch.
Signed-off
rror instead of calling BUG().
Change caller stub_recv_cmd_submit() to handle the get_pipe()
error return.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 16 ++--
1 file changed, 10 insertions(
Upstream commit 90120d15f4c3 ("usbip: prevent leaking socket pointer
address in messages")
usbip driver is leaking socket pointer address in messages. Remove
the messages that aren't useful and print sockfd in the ones that
are useful for debugging.
Signed-off-by: Shuah Khan
Cc:
bug.cgi?id=109351
Signed-off-by: Andrew Goodbody
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_event.c | 5 ++-
drivers/usb/usbip/vhci_hcd.c| 88 -
drivers/usb/usbip/vhci_rx.c | 30 --
drivers
Upstream commit 248a22044366 ("usbip: stub: stop printing kernel
pointer addresses in messages")
Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: Shuah Khan
Cc: stable
Signed-off-by: Greg Kroah-Hartman
---
drivers
bad input requesting for
unbounded memory allocations. Validate early in get_pipe() and return
failure.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 30 +++---
1 file changed, 27
laces socket pointer address
with sockfd.
Reported-by: Secunia Research
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 1 +
drivers/usb/usbip/vhci_sysfs.c | 26 +++---
tools/usb/usbip/libsrc/vhci_driver.c | 8
3 files changed, 20 inserti
Upstream commit 8272d099d05f ("usbip: vhci: stop printing kernel
pointer addresses in messages")
Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: Shuah Khan
Cc: stable
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/
et 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
Signed-off-by
e, leaving device unusable by the client. The device is still
attached and however client can't use it.
The problem was fixed as part of larger change to add USB3 Super Speed
support.
This patch isolates the one line fix to clear the USB_PORT_STAT_POWER
from the original patch.
Signed-off
fixed
in the first patch in this series masked this bug. With these two fixes,
client can use the imported devices on 4.4
Eric Biggers also reported the tcp_socket address still in the status
file while I am getting the patch ready. I added him to Reported-by.
Shuah Khan (2):
usbip: vhci_hcd:
On 01/30/2018 01:36 AM, Salvador Fandino wrote:
> Let me start by explaining the problem that have motivated me to write
> this patches:
>
> I work on the QVD, a virtual desktop platform for Linux. This software
> runs Linux desktops (i.e. XFCE, KDE) and their applications inside LXC
> containers,
On 01/28/2018 05:14 AM, Greg KH wrote:
> On Fri, Jan 26, 2018 at 11:54:35AM -0700, Shuah Khan wrote:
>> Upstream commit 1c9de5bf4286 ("usbip: vhci-hcd: Add USB3 SuperSpeed
>> support")
>
> Hm, I think you have the wrong commit id here.
>
> I don't se
Keep usbip_device sockfd state in sync with tcp_socket. When tcp_socket
is reset to null, reset sockfd to -1 to keep it in sync.
Signed-off-by: Shuah Khan
Cc: sta...@vger.kernel.org
---
drivers/usb/usbip/stub_dev.c | 3 +++
drivers/usb/usbip/vhci_hcd.c | 2 ++
2 files changed, 5 insertions
status file is fixed.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_hcd.c | 2 +-
drivers/usb/usbip/vhci_sysfs.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 00d68945548e..2d96bfd34138 100644
--
e, leaving device unusable by the client. The device is still
attached and however client can't use it.
The problem was fixed as part of larger change to add USB3 Super
Speed support. This patch backports just the change to clear the
USB_PORT_STAT_POWER.
Signed-off-by: Shuah Khan
---
dr
As I started backporting security fixes, I found a deadlock bug that was
fixed in a later release. This patch series contains backports for all
these problems.
Andrew Goodbody (1):
usb: usbip: Fix possible deadlocks reported by lockdep
Shuah Khan (3):
usbip: fix stub_rx: get_pipe() to
bug.cgi?id=109351
Signed-off-by: Andrew Goodbody
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_event.c | 5 ++-
drivers/usb/usbip/vhci_hcd.c| 88 -
drivers/usb/usbip/vhci_rx.c | 30 --
drivers
rror instead of calling BUG().
Change caller stub_recv_cmd_submit() to handle the get_pipe()
error return.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 18 +++---
1 file changed, 11 i
Upstream commit 90120d15f4c3 ("usbip: prevent leaking socket pointer
address in messages")
usbip driver is leaking socket pointer address in messages. Remove
the messages that aren't useful and print sockfd in the ones that
are useful for debugging.
Signed-off-by: Shuah Khan
Cc:
bad input requesting for
unbounded memory allocations. Validate early in get_pipe() and return
failure.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 30 +++---
1 file changed, 27
that this particular case statement
is meant to fall through.
Reviewed-by: Peter Senna Tschudin
Signed-off-by: Jonathan Dieter
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/usb/usbip/src/usbip.c b
arns 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().
Signed-off-by: Shuah
laces socket pointer address
with sockfd.
Reported-by: Secunia Research
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 1 +
drivers/usb/usbip/vhci_sysfs.c | 25 +++--
tools/usb/usbip/libsrc/vhci_driver.c | 8
3 files changed, 20 inserti
Reviewed-by: Peter Senna Tschudin
Signed-off-by: Jonathan Dieter
Acked-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
tools/usb/usbip/libsrc/usbip_common.c | 9 -
tools/usb/usbip/libsrc/usbip_host_common.c | 28 +++-
that this particular case statement
is meant to fall through.
Reviewed-by: Peter Senna Tschudin
Signed-off-by: Jonathan Dieter
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/usb/usbip/src/usbip.c b
laces socket pointer address
with sockfd.
Reported-by: Secunia Research
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 1 +
drivers/usb/usbip/vhci_sysfs.c | 25 +++--
tools/usb/usbip/libsrc/vhci_driver.c | 8
3 files changed, 20 inserti
anks to a script from Joe Perches, this was easily done.
>
> Reported-by: Joe Perches
> Cc: Peter Chen
> Cc: Felipe Balbi
> Cc: Johan Hovold
> Cc: Valentina Manea
> Cc: Shuah Khan
> Signed-off-by: Greg Kroah-Hartman
> ---
> drivers/usb/chipidea/o
Commit 2f2d0088eb93
("usbip: prevent vhci_hcd driver from leaking a socket pointer address")
in the /sys/devices/platform/vhci_hcd/status.
Fix the header and field alignment to reflect the changes and make it
easier to read.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_sy
ysfs/group.c:156
[] vhci_start+0x5b4/0x7a0 drivers/usb/usbip/vhci_hcd.c:978
[] usb_add_hcd+0x8da/0x1c60 drivers/usb/core/hcd.c:2867
[] vhci_hcd_probe+0x97/0x130
drivers/usb/usbip/vhci_hcd.c:1103
---
---
---[ end trace c33c7b202cf3aac8 ]---
Reported-by: Andrey Konovalov
Signed-off-by: Shuah Kha
: sta...@vger.kernel.org
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_list.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/tools/usb/usbip/src/usbip_list.c b/tools/usb/usbip/src/usbip_list.c
index f1b38e866dd7..d65a9f444174 100644
--- a/tools/usb/usbip/src/usbip_list.c
+++ b
with
accesses via the attached busid result in errors and system hangs during
shutdown.
Fix it to check and bail out if the device is already attached to vhci_hcd.
Cc: sta...@vger.kernel.org
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_bind.c | 9 +
1 file changed, 9 insertions
On 12/18/2017 11:00 PM, pei.zh...@intel.com wrote:
> From: Pei Zhang
>
> USB system will clear port's ENABLE feature for some USB devices when
> vdev is already assigned port address. This cause getPortStatus reports
> to system that this device is not enabled, client OS will failed to use
> this
linked %ssynchronously\n",
>seqnum, status == -ENOENT ? "" : "a");
> break;
> case -EINPROGRESS:
>
Thanks Colin!
Acked-by: Shuah Khan
Greg, Please pick this up.
thanks,
-- Shuah
--
To unsubscribe
ta_left(&msg);
> sock->sk->sk_allocation = GFP_NOIO;
>
> result = sock_recvmsg(sock, &msg, MSG_WAITALL);
>
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
Greg, please pick this patch up.
thanks,
-- Shuah
--
To unsubscribe from thi
On 12/30/2017 09:11 AM, Elad Wexler wrote:
> Fixup a coding style issue
>
> Signed-off-by: Elad Wexler
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
Greg, please pick this patch up.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe
On 12/30/2017 09:01 AM, Elad Wexler wrote:
> Fix possible resource leak: fd
>
> Signed-off-by: Elad Wexler
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
Greg, please pick this patch up.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubsc
1 - 100 of 281 matches
Mail list logo