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-98791 Overview
CVE-2026-98791 is a NULL pointer dereference vulnerability in the Linux kernel's Mellanox mlx5e Ethernet driver. The flaw occurs in the AF_XDP (Address Family eXpress Data Path) transmit path during queue teardown. When an XSK TX queue is torn down, outstanding descriptors are completed without a Completion Queue Entry (CQE). If one of those descriptors requested a TX timestamp, the completion path forwards a NULL CQE to mlx5e_xsk_fill_timestamp(), which then dereferences the pointer. The result is a kernel NULL pointer dereference that can crash the kernel and interrupt network operations.
Critical Impact
A local workload using AF_XDP with TX timestamping on a Mellanox mlx5 interface can trigger a kernel NULL dereference during queue teardown, resulting in a denial of service.
Affected Products
- Linux kernel net/mlx5e driver (Mellanox ConnectX adapters) with AF_XDP TX timestamp support
- Upstream Linux kernel versions prior to the fixing commits listed in stable trees
- Linux distributions shipping the vulnerable mlx5_core/mlx5e driver
Discovery Timeline
- 2026-10-18 - CVE-2026-98791 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98791
Vulnerability Analysis
The vulnerability resides in the mlx5e driver's AF_XDP (XSK) transmit completion path. AF_XDP sockets allow user-space applications to send and receive packets with minimal overhead by sharing memory rings with the NIC driver. When an application enables TX hardware timestamping on an AF_XDP socket, the driver normally reads the timestamp from the Completion Queue Entry produced by the NIC and writes it back to the user-space completion metadata.
During queue teardown, however, pending descriptors that were submitted but never completed by hardware must still be reclaimed. The driver walks those outstanding descriptors and completes them synthetically, without any backing CQE. The timestamp code path did not account for this condition. It unconditionally called mlx5e_xsk_fill_timestamp() with a NULL CQE pointer, which then performed field accesses on the NULL pointer. This is a classic NULL pointer dereference [CWE-476] triggered on a teardown code path.
Root Cause
The root cause is a missing precondition check in the AF_XDP TX completion handler. The function mlx5e_xsk_fill_timestamp() assumes a valid CQE is always provided, but the teardown path can legitimately pass NULL when no hardware completion was generated. The fix, applied across stable branches in commits 63df0ef4, 7b97273c, f81d40e2, and fce70b6b, returns zero when no CQE is available, signaling that teardown did not produce a TX timestamp.
Attack Vector
Exploitation requires local access and the capability to open an AF_XDP socket on an mlx5e-managed interface, which typically requires CAP_NET_RAW or equivalent privileges. An attacker, or a buggy workload, submits TX descriptors requesting hardware timestamps and then triggers queue teardown before all descriptors complete. The teardown reclaim path dereferences the NULL CQE and crashes the kernel. The attack vector is denial of service rather than code execution. See the upstream patches for the exact teardown path, including Kernel Git Commit 63df0ef and Kernel Git Commit fce70b6.
Detection Methods for CVE-2026-98791
Indicators of Compromise
- Kernel oops or panic messages referencing mlx5e_xsk_fill_timestamp or mlx5e_poll_xdpsq_cq in the call stack.
- BUG: kernel NULL pointer dereference entries in dmesg originating from the mlx5_core module during interface reconfiguration or XSK socket close.
- Unexpected link resets or driver reinitialization events correlated with AF_XDP workloads using TX timestamping.
Detection Strategies
- Monitor /var/log/kern.log and journalctl -k for stack traces that include mlx5e_xsk_ symbols and NULL dereference signatures.
- Audit which processes open AF_XDP sockets (AF_XDP socket family) and request SOF_TIMESTAMPING_TX_HARDWARE on mlx5 interfaces.
- Track kernel version and mlx5_core module version against the patched commits in the stable kernel git tree.
Monitoring Recommendations
- Forward kernel ring buffer events to a centralized logging pipeline for correlation with host crashes and reboots.
- Alert on repeated mlx5e driver resets on the same host within short time windows.
- Baseline AF_XDP socket usage per host so new or anomalous XSK workloads are flagged for review.
How to Mitigate CVE-2026-98791
Immediate Actions Required
- Inventory hosts running the mlx5_core/mlx5e driver, particularly those using AF_XDP with TX hardware timestamping (DPDK-like workloads, high-performance packet processing, telemetry collectors).
- Apply the vendor or distribution kernel update that incorporates the upstream fix commits once available for your kernel branch.
- Restrict CAP_NET_RAW and AF_XDP socket creation to trusted service accounts to reduce the local attack surface.
Patch Information
The fix returns zero from mlx5e_xsk_fill_timestamp() when no CQE is available, indicating that teardown produced no TX timestamp. The change is distributed across the following upstream commits: Kernel Git Commit 63df0ef, Kernel Git Commit 7b97273, Kernel Git Commit f81d40e, and Kernel Git Commit fce70b6. Rebuild and reboot into a kernel that includes the backport for your stable branch.
Workarounds
- Disable TX hardware timestamping on AF_XDP sockets where it is not strictly required by the workload.
- Avoid repeated AF_XDP queue teardown and recreation on production mlx5e interfaces until a patched kernel is deployed.
- Constrain AF_XDP usage through Linux capabilities and seccomp policies so untrusted workloads cannot open XSK sockets on mlx5e interfaces.
# Verify running kernel and mlx5_core module version
uname -r
modinfo mlx5_core | grep -E '^(version|srcversion|filename):'
# Identify processes that have opened AF_XDP sockets
ss -xa | grep -i xdp
lsof -U 2>/dev/null | grep -i xdp
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

