Re: [PATCH] thunderbolt: Validate BAR 0 resource type and size

From: Mika Westerberg

Date: Wed Aug 26 2026 - 00:39:53 EST


Hi,

On Tue, Aug 25, 2026 at 04:09:37PM +0000, syzbot wrote:
> From: Marco Elver <elver@xxxxxxxxxx>
>
> The thunderbolt driver can crash with a page fault if it binds to an
> arbitrary PCI device (e.g., via sysfs driver_override) that has an I/O port
> BAR at index 0 instead of an MMIO BAR.

Well, if you bind it to a random PCIe device you get what you asked for.
This is specifically the reason we have the PCI IDs and the like in the
drivers. Anything outside of that you need to know what you are doing.