CVE-2026-138935: i3c: master: adi: free the IRQ before unregistering the master
In the Linux kernel, the following vulnerability has been resolved:
i3c: master: adi: free the IRQ before unregistering the master
adii3cmasterirq() is requested with devmrequestirq(), so it stays registered when adii3cmasterremove() runs, and the writes masking the controller IRQ sources do not synchronize with a handler that is already running on another CPU. i3cmasterunregister() then frees the struct i3cdevdesc objects that master->ibi.slots[] still point to, so the IBI path in adii3cmasterhandleibi() can dereference freed memory.
Fix this by storing the IRQ number in the private structure and calling devmfreeirq() after the IRQ sources are masked, so a running handler is finished before the master is torn down.
This issue was found by an in-house static analysis tool.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Store the IRQ number in the private structure, mask the IRQ sources, then call devm_free_irq() before i3c_master_unregister() so any running handler finishes before the master is torn down.