Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lucas Pascal" <lucas.pascal@pqshield.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usbip: usbip_host: fix invalid device pointer use in do_rebind()
Date: Fri, 27 Nov 2026 14:54:06 +0000	[thread overview]
Message-ID: <sashiko-outbox-237621@kernel.org> (raw)
In-Reply-To: <20261127144551.350348-1-lucas.pascal@pqshield.com>

> stub_probe() saves the usb_device in the busid table without taking a
> reference, and nothing clears it when the device goes away. Writing the
> busid to the "rebind" attribute, the last step of "usbip unbind", passes
> that pointer to device_attach() to give the device back to its original
> driver; so does stub_device_rebind() when the module is removed.
> 
> That pointer is invalid in two cases:
> 
> - The device was disconnected since it was bound to usbip-host, and
>   do_rebind() uses a freed usb_device. This happens when a device stops
>   responding while exported: closing its usbip connection makes
>   usbip-host reset it, the reset fails and the hub driver disconnects
>   it. The following "usbip unbind" oopses:
> 
>     BUG: kernel NULL pointer dereference, address: 00000000000000e0
> [ ... ]
> Fixes: a46034ca57ed ("staging: usbip: trigger driver probing after unbinding from usbip-host")
> Cc: stable@vger.kernel.org
> Reported-by: syzbot+af76b01c9a0f0ab60fb0@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=af76b01c9a0f0ab60fb0
> Signed-off-by: Lucas Pascal <lucas.pascal@pqshield.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127144551.350348-1-lucas.pascal@pqshield.com?part=1

      reply	other threads:[~2026-11-27 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 14:45 [PATCH] usbip: usbip_host: fix invalid device pointer use in do_rebind() Lucas Pascal
2026-11-27 14:54 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-237621@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lucas.pascal@pqshield.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox