AZL-118628: CVE-2026-143346 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: take ownership of saved RX state at poll entry
When a saved partial packet completes with a poll budget of one, the old loop can leave statesaved and state.skb pointing at an skb that has already been delivered or freed. The next poll then reuses that pointer, causing a use-after-free or double free.
Take the saved state at poll entry and clear the stored ownership immediately. Save it again only if the packet remains incomplete, including when the next descriptor is still DMA-owned.
Track the frame-in-progress flag independently of the status read from the next descriptor. The old code keyed the save on the status of the last descriptor looked at, so a loop stopped at a DMA-owned descriptor (rx status not yet valid) could drop the saved error/length bookkeeping in stmmacrxzc().
Drop the saved state both when the queue parameters are reset and when the ring is destroyed. stmmacresetrxqueue() is reached from stmmacopen(), stmmacxdpopen(), stmmacresume() and stmmacenablerxqueue(); without draining it there, a partial frame saved before suspend (or before a queue is disabled and re-enabled) survives while currx and dirtyrx are rewound to zero. On the resume path the ring is only re-armed in place: stmmaccleardescriptors() sets the ownership bits and stmmacinitdmaengine() restores the tail pointer, but the RX buffer addresses are not reprogrammed. The first poll would then resume the stale skb against a ring position that no longer matches the descriptors it was built from. freedmarxdescresources() releases it on teardown.
Apply the same state handling to stmmacrxzc(), which also leaves statesaved set when a saved frame finishes at the budget boundary. That path saves only error and length bookkeeping, not an skb pointer.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In stmmac_rx_zc(), take ownership of saved RX state at poll entry and clear the stored ownership; save it again only if the packet remains incomplete. Drop saved state when queue parameters are reset and in the listed open, resume, and RX-queue-enable paths, including __stmmac_open(), stmmac_xdp_open(), stmmac_resume(), and stmmac_enable_rx_queue().
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel stmmac network driver are implicated. The affected package identified in the data is azure-linux/kernel version 6.6.161.1-1.
What runtime condition triggers the unsafe memory handling?
The issue can occur when a saved partial receive packet completes while the polling budget is one. A subsequent poll can then reuse an skb pointer that was already delivered or freed, resulting in a use-after-free or double free.
Can queue lifecycle events contribute to the problem?
Yes. Saved partial-frame state can persist across queue resets, ring destruction, suspend/resume, or queue disable and re-enable operations unless it is dropped. The resolved code explicitly clears this saved state during queue reset and ring teardown.