CVE-2026-89740: serial: imx: serialize imx_uart_ports[] lifetime
In the Linux kernel, the following vulnerability has been resolved:
serial: imx: serialize imxuartports[] lifetime
imxuartprobe() publishes its devm-allocated port in imxuartports[] before uartaddoneport() because console setup uses the table. The entry is not cleared when adding the port fails or after removal, leaving a dangling pointer.
A sibling probe can register the shared console through that stale entry. This was reproduced under KASAN on QEMU mcimx6ul-evk by unbinding a sibling UART, unbinding the console UART and rebinding the sibling.
Keep the entry valid through uartremoveoneport(), then clear it. Protect port addition and removal together with their table updates so sibling operations cannot interleave. Reject an occupied slot rather than clobbering an active port during a duplicate-line probe.
Affected Software
Event History
Frequently Asked Questions
Which systems are most exposed to this issue?
Systems using the i.MX UART driver are exposed when UART probe or removal activity can occur alongside sibling UART operations, particularly where a shared console is involved. The reported reproduction unbound a sibling UART, unbound the console UART, and then rebound the sibling UART.
What conditions are needed to trigger the dangling-pointer path?
A port entry must be published in imx_uart_ports[] and then become invalid because adding the port fails or the port is removed without clearing the entry. A sibling probe can then use that stale entry while registering the shared console.
What can be done if the fix cannot be applied immediately?
Avoid unbinding and rebinding i.MX UART devices, especially sequences involving both a console UART and a sibling UART. Also avoid duplicate-line probe situations that could target an already occupied table slot.
How can administrators investigate whether the issue has occurred?
The issue was reproduced with KASAN during UART unbind and rebind operations. Investigations should focus on i.MX UART add failures or removals followed by sibling UART probing or shared-console registration, since those sequences can leave and consume a stale table entry.