CVE-2026-143058: gpio: brcmstb: fix UAF after IRQ domain setup failure
In the Linux kernel, the following vulnerability has been resolved:
gpio: brcmstb: fix UAF after IRQ domain setup failure
When devmrequestirq() fails in brcmstbgpioirqsetup(), the error path removes the IRQ domain but leaves priv->irqdomain non-NULL.
The probe error path subsequently calls brcmstbgpioremove(), which checks priv->irqdomain and attempts to access the already-freed domain through irqfindmapping(). It also attempts to remove the domain again, resulting in a use-after-free and potentially further memory corruption.
Set priv->irqdomain to NULL after removing it so that the common cleanup path skips the already-freed IRQ domain.
This issue was found by our static analysis tool under development.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Set priv->irq_domain to NULL after removing the IRQ domain so the cleanup path does not access the freed domain.
Linux kernel brcmstb GPIO driver priv->irq_domain = NULL
Event History
Frequently Asked Questions
Which systems are exposed to this flaw?
Systems running the Linux kernel with the brcmstb GPIO driver are exposed when that driver's IRQ setup is attempted and devm_request_irq() fails during probing.
What must occur for the use-after-free path to be reached?
The initial IRQ request must fail in brcmstb_gpio_irq_setup(). The resulting probe cleanup then accesses and removes an IRQ domain that was already freed.