HIGH Introduced in 5.11
veth XdpNapi UAF
CVE-2026-80613
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: veth: fix NAPI leak in XDP enable error path During XDP enablement in veth, if xdp_rxq_info_reg() or xdp_rxq_info_reg_mem_model() fails, the driver rolls back the changes. However, the rollback loop: for (i--; i >= start; i--) { decrements the loop index 'i' before the first iteration. This correctly skips unregistering the rxq for the failed index 'i' (as registration failed or was already cleaned up), but it also erroneously skips calling netif_napi_deli() for rq[i].xdp_napi. Since netif_napi_add() was already called for index 'i', this leaves a dangling napi_struct in the device's napi_list. When the veth device is later destroyed, the freed queue memory (which contains the leaked NAPI structure) can be reused. The subsequent device teardown iterates the NAPI list and corrupts the reallocated memory, leading to UAF. Fix this by explicitly deleting the NAPI association for the failed index 'i' before rolling back the successfully configured queues.
02KernelScan AI Analysis
Risk summary
A local unprivileged user who can create a user namespace (and thus obtain CAP_NET_ADMIN) can trigger a use-after-free in the veth driver by causing an error during XDP enablement. The leaked NAPI structure remains on the device list after its backing memory is freed, and subsequent device teardown corrupts reallocated memory. This can lead to kernel code execution and container escape.
Vulnerability analysis
When enabling XDP on a veth device, the driver adds NAPI structures to each receive queue before finishing queue setup. If setup fails for one queue, the error cleanup skips removing that queue's NAPI structure from the device list. The queue memory is later freed, leaving the NAPI entry dangling. When the device is eventually destroyed, the kernel walks that list and touches the freed memory, which may have been reallocated, causing a use-after-free. The fix removes the leaked NAPI entry for the failed queue before cleaning up the rest. Any local user who can obtain CAP_NET_ADMIN in a user namespace can reach this, so it is exploitable from unprivileged container workloads.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.11 | 5.15.212 | fc51373345e7 |
| 6.1 | 5.11 | 6.1.178 | 4559770b2a24 |
| 6.12 | 5.11 | 6.12.97 | d3eb258ad398 |
| 6.18 | 5.11 | 6.18.40 | a9e6707322ef |
| 6.6 | 5.11 | 6.6.145 | 83090f5e7b54 |
| 7.1 | 5.11 | 7.1.5 | 4bd2e5dbe623 |
| mainline | 5.11 | 7.2 | 6739027cb72d |
| cip/6.1 | 5.11 | 6.1.182-cip59 | 4559770b2a24 |
| cip/6.1-rt | 5.11 | 6.1.182-cip59-rt31 | 4559770b2a24 |
| cip/6.12 | 5.11 | 6.12.101-cip29 | d3eb258ad398 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.101-cip29 |
| cip/6.1 | Fixed in 6.1.182-cip59 |
| cip/6.1-rt | Fixed in 6.1.182-cip59-rt31 |