All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Farhad Alemi <farhad.alemi@berkeley.edu>,
	Peter Chen <peter.chen@kernel.org>,
	falemi@asu.edu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] ci_hdrc_add_device -- KASAN slab-out-of-bounds reading a FOREIGN device's platform_data
Date: Fri, 28 Aug 2026 10:34:04 +0200	[thread overview]
Message-ID: <20260828101926.086f97dc.michal.pecio@gmail.com> (raw)
In-Reply-To: <2026082846-lethargic-ability-93dd@gregkh>

On Fri, 28 Aug 2026 08:01:19 +0200, Greg Kroah-Hartman wrote:
> On Thu, Aug 27, 2026 at 10:34:56PM -0700, Farhad Alemi wrote:
> >
> >   BUG: KASAN: slab-out-of-bounds in ci_hdrc_add_device+0xb76/0xd10
> >   Read of size 4 at addr ffff88810e9061c8 by task repro/9505
> >   Call Trace:
> >    ci_hdrc_add_device+0xb76/0xd10
> >    ci_hdrc_usb2_probe+0x22d/0x370
> >    platform_probe+0xf9/0x190
> >    really_probe+0x267/0xaf0
> >    __driver_probe_device+0x1e2/0x350
> >    device_driver_attach+0xe0/0x1d0
> >    bind_store+0x1d0/0x220
> >    kernfs_fop_write_iter+0x3af/0x540
> >    vfs_write+0x61d/0xb90
> >    ksys_write+0x150/0x270

This would be more useful with decoded line numbers, like Syzbot does.

But it looks like you don't actually have this hardware and are trying
to bind the driver to a different device by means of 'driver_override'
or 'new_id'. Many others monkeying with this recently, hence...

> But again, stop messing around with root-only sysfs files without
> understanding that you get to keep the broken pieces of the kernel
> if you touch them :)
> 
> thanks,
> 
> greg k-h

And for the record, I still think that focusing on bind/unbind is
misguided because this interface can be used to trigger actual bugs
which would otherwise need connection or reboot cycles to trigger,
and they would still trigger after sufficient wasted time, with same
stack but 'init_module' or 'usb_new_device' instead of 'bind_store'.

Conversely, this splat could as well be caused by a PCI device with
spoofed IDs (think VM). Possibly even by adding a new ID and running
PCI rescan, so no custom VM needed. Too lazy to try it now...

Actual issue is that the kernel doesn't care about working around
platform/pci/insert/other/subsystems anomalies which don't actually
exist in the field, and I think that's what should be communicated.

Regards,
Michal


  parent reply	other threads:[~2026-08-28  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  5:34 [BUG] ci_hdrc_add_device -- KASAN slab-out-of-bounds reading a FOREIGN device's platform_data Farhad Alemi
2026-08-28  6:01 ` Greg Kroah-Hartman
2026-08-28  6:11   ` Greg Kroah-Hartman
2026-08-28  8:34   ` Michal Pecio [this message]
2026-08-28 10:59 ` Greg Kroah-Hartman
2026-08-28 11:18   ` Farhad Alemi
2026-08-28 12:10     ` Greg Kroah-Hartman

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=20260828101926.086f97dc.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=falemi@asu.edu \
    --cc=farhad.alemi@berkeley.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.