KernelScan.io

CRITICAL Introduced in 6.4

mlx5e XSK UAF

CVE-2026-99078

CVSS 9.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Prevent stale XSK buffer release on MPWQE refill retry With AF_XDP on a striding RQ, mlx5e defers releasing XSK buffers until an MPWQE is refilled. If XSK allocation then returns -ENOMEM, actual_wq_head is not advanced and a later NAPI poll retries the same WQE. mlx5e_free_rx_mpwqe() leaves each released slot marked as releasable. On retry it can therefore call xsk_buff_free() again through stale pointers after the frames have returned to the XSK pool and been reallocated. Set all skip_release_bitmap bits in the common error path of mlx5e_xsk_alloc_rx_mpwqe(). This matches mlx5e_alloc_rx_mpwqe(). A successful allocation already clears the bitmap after replacing every buffer, so retries become idempotent without changing the success path. Fault injection forced three consecutive failures for one selected MPWQE. Both an early allocation failure and a partial 8-of-16-buffer unwind released the original 16 XSK buffers only once. Each error left a full bitmap, the following NAPI retry skipped the release, and a later successful allocation cleared it. A 20-second AF_XDP zero-copy pressure run exercised 1,575,262 buffer allocation failures without invalid descriptors, WQE errors, or kernel warnings.

02

Engine v0.9.0

Risk summary

A local attacker with AF_XDP socket access on a Mellanox mlx5e NIC can trigger a use-after-free by exhausting memory during MPWQE refill, causing the driver to free the same XSK buffers twice on retry. This leads to kernel memory corruption, enabling privilege escalation or denial of service.

Affecteddrivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c (mlx5e AF_XDP receive)

Vulnerability analysis

When AF_XDP operates on a striding receive queue, the mlx5e driver defers releasing XSK buffers until a multi-packet WQE (MPWQE) is refilled. If buffer allocation fails with ENOMEM, the WQE is not advanced and a later NAPI poll retries the same WQE. However, the original error path did not mark the slots as 'skip release', so the retry path would call xsk_buff_free() again on buffers that had already been returned to the XSK pool and potentially reallocated for other purposes. The fix sets all bits in the skip_release_bitmap on any allocation error, making retries idempotent. An attacker with local access who can create AF_XDP sockets (requiring CAP_NET_ADMIN, obtainable in a user namespace) and induce memory pressure can trigger this condition on Mellanox ConnectX-4/5/6/7 hardware.

03

BranchIntroducedFixed inPatch commit
6.126.46.12.113d215d09606b0
6.186.46.18.57867119b4b588
6.66.46.6.160f3a52e2ec278
7.26.47.2.113d73a1164a8c
mainline6.47.363811edf5125
cip/6.126.46.12.114-cip34d215d09606b0

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.114-cip34