CVE-2026-64583

Source
https://cve.org/CVERecord?id=CVE-2026-64583
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64583.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64583
Downstream
Published
2026-08-06T07:06:25.335Z
Modified
2026-08-08T03:32:28.982652574Z
Summary
usb: gadget: udc: bdc: free IRQ and drain func_wake_notify before teardown
Details

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: udc: bdc: free IRQ and drain funcwakenotify before teardown

The Broadcom BDC UDC driver registers its IRQ handler with devmrequestirq() in bdcudcinit(), so the IRQ is released by devm only after bdcremove() returns. devm releases resources in reverse LIFO order, but bdcremove() runs bdcudcexit() and bdchwexit() -> bdcmemfree() manually before returning: bdcudcexit() tears down individual endpoint objects via bdcfreeep(), while bdchwexit() -> bdcmemfree() frees and NULLs the DMA-coherent status-report ring (bdc->srr.srbds) and kfree()s bdc->bdceparray. Both happen while the IRQ handler (bdcudcinterrupt, requested with IRQFSHARED) remains deliverable in the window up to the post-remove devm free_irq().

On receipt of a shared interrupt in that window, bdcudcinterrupt() dereferences bdc->srr.srbds[bdc->srr.dqpindex] (NULL or freed DMA) and dispatches srhandler callbacks that index into bdcep_array, causing a NULL-deref or use-after-free.

The same window affects the delayedwork bdc->funcwakenotify, which is armed from the IRQ handler via bdcsruspc() -> handlelinkstatechange() -> scheduledelayedwork() and may self-rearm from its own callback bdcfuncwaketimer(). No cancel exists anywhere in the driver, so a queued work item that fires after bdcremove() returns and the bdc structure is devm-freed dereferences freed memory.

Replace devmrequestirq() with requestirq() and add an explicit freeirq(bdc->irq, bdc) in bdcremove(). Clear BDCGIE before freeirq() to stop the device from asserting interrupts, then freeirq() drains any in-flight handler, then canceldelayedworksync() drains the funcwakenotify delayed work. This ordering ensures the IRQ handler and delayed work cannot interfere with the subsequent endpoint and DMA teardown in bdcudcexit() and bdchwexit(). Wire the matching freeirq() into the bdcudcinit() error path so the IRQ is released on probe failure, and route the bdcinitep() failure through err0 instead of returning directly.

This issue was found by an in-house static analysis tool.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64583.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
efed421a94e62a7ddbc76acba4312b70e4be958f
Fixed
1a1d7158420df6b8fa1efc0cdd6ab704801a4fc8
Fixed
f6fc21ec7ccd83726ba766d73d0b8cc03e726475
Fixed
dcf3e2f164435b5844706cb8eefef29ebee0eedb
Fixed
d4964a74717107697999f48bcb4e80a9c0679a27
Fixed
0583f2fbf8f86ae3a0ce054f96783dd83e65d9bb

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64583.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.19.0
Fixed
6.6.148
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.101
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.42
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64583.json"