From: Greg KH <gregkh@linuxfoundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Oliver Neukum <oneukum@suse.com>,
Nicholas Carlini <npc@anthropic.com>,
linux-usb@vger.kernel.org
Subject: Re: Stack buffer overflow (write) in kvaser_usb_leaf_wait_cmd via malicious USB
Date: Thu, 26 Feb 2026 20:29:45 -0800 [thread overview]
Message-ID: <2026022617-disengage-spinning-c6bd@gregkh> (raw)
In-Reply-To: <862abc70-18ce-422c-bdf2-f02b984193c0@rowland.harvard.edu>
On Tue, Feb 24, 2026 at 01:43:24PM -0500, Alan Stern wrote:
> On Tue, Feb 24, 2026 at 05:04:28PM +0100, Oliver Neukum wrote:
> >
> >
> > On 24.02.26 16:52, Alan Stern wrote:
> > > On Tue, Feb 24, 2026 at 09:44:35AM +0100, Oliver Neukum wrote:
> >
> > > > What is the logic behind that? If we can trust that a device
> > > > is what it claims to be and operates like it is supposed to
> > > > be, why do we verify?
> > >
> > > Greg said that we trust the hardware once a driver is bound to the
> > > device. However, the endpoint-verification tests occur before the
> > > binding is complete. At this point we do not yet fully trust the
> > > hardware.
> >
> > Why? If we do not trust the hardware, we cannot depend on it
> > telling the truth about itself, can we?
>
> The purpose of the endpoint testing is to avoid warnings triggered by
> driver submitting URBs to endpoints that are known not to exist. Such
> submissions are generally considered to be signs of a bug in the driver,
> not of a deception by the device.
>
> Legitimate example: A new revision of a device uses different endpoint
> numbers from the original version, but the driver isn't aware of this
> and doesn't check. The problem would then lie in the driver, not in the
> revised device firmware.
>
> Even if a device lies about itself, the tests will prevent these
> warnings from triggering. (The endpoint in question might not in fact
> exist on the device, but as long as the device's descriptors claim that
> the endpoint does exist, usbcore won't know any better and so won't
> issue a warning.)
>
> Of course we can't detect all cases in which a device lies about itself.
> The hope is that drivers will be robust enough to handle devices that do
> not behave as expected...
>
> > > While it's always possible that some real device somewhere will fail
> > > these tests, a much more likely reason for a failure is because the
> > > driver is being fuzzed. We do know that these fuzzing tests occur in
> > > real life and that they will crash the kernel being tested if the tests
> > > aren't present.
> >
> > Now, if we are looking at regular hardware, we need to ask ourselves:
> > Is it likelier that some devices are different from all others,
> > or may they have a race condition with a small window that leads
> > to faulty data packages rarely being generated?
>
> ... such as by occasionally generating faulty data packets. Drivers
> should be able to handle such things gracefully, without crashing the
> kernel.
Given that I have to answer this type of question about every other week
these days given the fuzzing reports we get sent to the
security@kernel.org alias, I think I need to just write up a "here is
the Linux USB threat model that we currently support" document to
describe what the state is.
We can then work from there, either agreeing that we need to "move" the
level of interaction for which we trust / do not trust a device in the
lifecycle of a USB device, or just be happy with where it currently is.
That should work better with some groups that I know are working to do
stuff to "harden" the USB device stack for some specific use cases,
hopefully just using the existing user api that we have today that
USBGuard uses, or possibly adding to that to handle some missing areas
that we have not previously considered.
thanks,
greg k-h
next prev parent reply other threads:[~2026-02-27 4:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 2:13 Stack buffer overflow (write) in kvaser_usb_leaf_wait_cmd via malicious USB Nicholas Carlini
2026-02-18 5:12 ` Greg KH
2026-02-24 8:44 ` Oliver Neukum
2026-02-24 15:52 ` Alan Stern
2026-02-24 16:04 ` Oliver Neukum
2026-02-24 18:43 ` Alan Stern
2026-02-27 4:29 ` Greg KH [this message]
2026-02-28 2:22 ` Alan Stern
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=2026022617-disengage-spinning-c6bd@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=npc@anthropic.com \
--cc=oneukum@suse.com \
--cc=stern@rowland.harvard.edu \
/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