Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97955 Overview
CVE-2026-97955 is a use-after-free vulnerability in the Linux kernel's Microsoft Azure Network Adapter (MANA) driver. The flaw resides in the mana_xdp_set() function, which publishes a new eBPF XDP program pointer into apc->bpf_prog before allocating receive buffers. When mana_pre_alloc_rxbufs() fails, the function returns without restoring the previous program pointer. The BPF core then releases its reference and the program memory can be freed, while apc->bpf_prog still holds a dangling pointer. Subsequent consumers such as mana_chn_setxdp() call bpf_prog_add() on freed memory, leading to kernel memory corruption.
Critical Impact
Local users with network configuration privileges can trigger a use-after-free in the MANA driver by attaching an XDP program when per-queue RX buffer pre-allocation fails, potentially leading to kernel memory corruption or privilege escalation.
Affected Products
- Linux kernel versions containing the MANA driver with the vulnerable mana_xdp_set() code path
- Azure virtual machines using the Microsoft Azure Network Adapter (MANA)
- Stable kernel branches fixed by commits 4c46beb, 5b3cdc9, and 9801edf
Discovery Timeline
- 2026-09-25 - CVE CVE-2026-97955 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97955
Vulnerability Analysis
The vulnerability is a classic use-after-free in the MANA network driver's XDP attach path. The function mana_xdp_set() must publish the new BPF program pointer early because mana_pre_alloc_rxbufs() reads the program via mana_get_rxbuf_cfg() to compute buffer sizes. The error path that restores the previous program pointer is reached only through the err_dealloc_rxbuffs label.
When mana_pre_alloc_rxbufs() fails, the function returns the error directly and skips the restoration label. The attach is reported as failed to the BPF core, which drops its reference count. The program can then be freed by the kernel, but apc->bpf_prog still contains the stale pointer.
Root Cause
The root cause is an incomplete error-handling path that fails to roll back state published to a shared structure. The driver optimistically assigns the new program pointer, then neglects to revert it on every failure path. This is an instance of improper cleanup after a failed operation, resulting in a dangling kernel pointer.
Attack Vector
The condition is reachable from an unprivileged-looking administrative command such as ip link set dev ethX xdp obj ... whenever the per-queue RX buffer pre-allocation cannot be satisfied, for example under memory pressure. The next consumer of mana_xdp_get(), typically mana_chn_setxdp() invoked from mana_alloc_queues() on the subsequent interface up or after a TX timeout reset, calls bpf_prog_add() on freed memory. This triggers the use-after-free and can corrupt kernel heap state.
// Vulnerability described in prose only - no verified exploit code available.
// See kernel commits 4c46beb, 5b3cdc9, and 9801edf for the authoritative fix.
Detection Methods for CVE-2026-97955
Indicators of Compromise
- Kernel oops or panic messages referencing bpf_prog_add, mana_chn_setxdp, or mana_alloc_queues in dmesg
- KASAN use-after-free reports naming apc->bpf_prog or the MANA driver call stack
- Repeated failed XDP attach operations on MANA interfaces followed by interface state transitions
Detection Strategies
- Monitor kernel logs for stack traces that implicate the MANA driver during XDP attach, interface up, or TX timeout recovery events
- Audit use of ip link set ... xdp commands correlated with low-memory conditions on Azure VMs
- Enable KASAN on test or canary systems running MANA to surface use-after-free conditions during XDP load testing
Monitoring Recommendations
- Track running kernel versions across Azure VM fleets and flag hosts missing the three fix commits
- Alert on unexpected network interface flaps or TX timeout resets on MANA-backed interfaces
- Collect and centralize dmesg output to support retrospective hunting for BPF-related kernel faults
How to Mitigate CVE-2026-97955
Immediate Actions Required
- Apply the upstream fix commits 4c46beb807ef, 5b3cdc9abd82, and 9801edfba8df or upgrade to a stable kernel release that includes them
- Restrict CAP_NET_ADMIN and CAP_BPF to trusted administrators on Azure VMs using MANA
- Avoid running XDP attach operations under memory pressure on unpatched systems
Patch Information
The upstream fix restores the previous apc->bpf_prog pointer on the mana_pre_alloc_rxbufs() failure path, eliminating the dangling pointer. Reference the following stable kernel commits for the authoritative patch: Linux Kernel Commit 4c46beb, Linux Kernel Commit 5b3cdc9, and Linux Kernel Commit 9801edf.
Workarounds
- Disable or avoid XDP program attachment on MANA interfaces until the patch is applied
- Reduce the risk of RX buffer pre-allocation failure by ensuring sufficient free memory before any XDP attach operation
- Limit who may invoke ip link set dev ... xdp by tightening sudoers rules and capability assignments
# Verify the running kernel contains the fix commits
uname -r
git log --oneline | grep -E '4c46beb|5b3cdc9|9801edf'
# Temporarily restrict XDP attach capability on unpatched hosts
setcap -r /usr/sbin/ip 2>/dev/null || true
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

