CVE-2026-139777: remoteproc: xlnx: Initialize mailbox work before requesting channels
In the Linux kernel, the following vulnerability has been resolved:
remoteproc: xlnx: Initialize mailbox work before requesting channels
zynqmpr5setupmbox() installs zynqmpr5mbrxcb() as the mailbox RX callback before requesting the mailbox channels, but initializes ipi->mboxwork only after both channels have been requested. Once the RX channel is active, a notification delivered before the late INITWORK() would make the callback queue an uninitialized work item.
Initialize the work item before requesting channels. Also drain the work before freeing the mailbox state, after the channels have been released so no new callbacks can queue it. Use the same drain before freeing ipi from the channel request error paths, since the callback is already published there as well.
This issue was found by our static analysis tool and then confirmed by manual review of the mailbox setup sequence. The callback is published before the channel requests complete, so the work item should be ready before the mailbox provider can invoke it.
A QEMU PoC modeled a mailbox notification delivered after the RX callback became reachable but before the delayed INITWORK(). DEBUGOBJECTS reported queueing an uninitialized work item from the zynqmpr5setupmbox() path.
This is sent as an RFC because the practical trigger depends on the ZynqMP IPI mailbox provider and firmware delivery timing. If the provider cannot invoke the RX callback until after setup returns, this is a defensive lifecycle cleanup rather than a reachable race on current systems.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
Initialize ipi->mbox_work before requesting the mailbox channels in zynqmp_r5_setup_mbox().
- Compensating control
After releasing the channels, drain ipi->mbox_work before freeing the mailbox state, including on channel-request error paths.
Event History
Frequently Asked Questions
Which systems are exposed to this race?
Systems using the Linux kernel's Xilinx ZynqMP R5 remoteproc mailbox setup are exposed when the mailbox RX callback is published and the RX channel can deliver notifications.
What must happen for the issue to be triggered?
A mailbox notification must arrive after the RX callback becomes reachable but before mbox_work has been initialized. The callback can then attempt to queue an uninitialized work item.
Can this occur when mailbox channel setup fails?
Yes. The callback is already published during channel-request error paths, so those paths also need to drain the work before freeing the mailbox state.
How might this be identified during testing?
DEBUG_OBJECTS can report an attempt to queue an uninitialized work item. The issue was also reproduced with a QEMU proof of concept that delivered a mailbox notification during the setup window.