AZL-117340: CVE-2026-139777 affecting package kernel 6.6.161.1-1
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.
- Compensating control
Initialize ipi->mbox_work before requesting mailbox channels. Drain the work before freeing mailbox state after channels are released, including on channel-request error paths.
Event History
Frequently Asked Questions
Which systems are exposed to this race condition?
Systems using the Linux kernel's Xilinx ZynqMP R5 remoteproc mailbox setup path are exposed when the RX mailbox callback can receive a notification during channel setup. The issue concerns the window after the callback is published but before its work item is initialized.
What must happen for the issue to be triggered?
A mailbox notification must arrive after the RX callback becomes reachable and before the delayed work initialization completes. The described proof of concept models exactly this timing window.
What is the relevant mitigation if an update cannot be applied immediately?
The provided information does not identify a configuration workaround. Reducing or preventing use of the affected ZynqMP R5 remoteproc mailbox path would avoid the described callback timing window, but no specific operational mitigation is provided.
How can I determine whether my system includes the affected fix?
Inspect the remoteproc Xilinx mailbox setup code to verify that the mailbox work item is initialized before mailbox channels are requested, and that the work is drained after channels are released before mailbox state is freed. Error paths after callback publication should also drain the work before freeing the mailbox state.