HIGH Introduced in 5.15
veth ChannelResize UAF
CVE-2026-98381
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.0HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: veth: manage XDP program pointers during channel resize veth_set_channels() tears down XDP resources for removed RX queues without clearing rq->xdp_prog. If the program is then detached or replaced, those queues keep the old pointer after bpf_prog_put(). A later channel increase can re-enable NAPI and run the freed program. BUG: unable to handle page fault for address: ffffc90000256048 Oops: Oops: 0000 [#1] SMP KASAN NOPTI RIP: veth_xdp_rcv_skb (include/linux/filter.h:779 include/net/xdp.h:696 drivers/net/veth.c:820) Call Trace: veth_xdp_rcv (drivers/net/veth.c:941) veth_poll (drivers/net/veth.c:986) __napi_poll (net/core/dev.c:7787) net_rx_action (net/core/dev.c:7850 net/core/dev.c:8007) handle_softirqs (kernel/softirq.c:645) Kernel panic - not syncing: Fatal exception in interrupt
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN — obtainable inside an unprivileged user namespace — can trigger a use-after-free of an XDP program in the veth driver by resizing channels, detaching the program, then resizing back up. This can lead to kernel code execution, privilege escalation, or a panic. Container hosts and multi-tenant systems using veth networking are especially exposed.
Vulnerability analysis
When a veth device's channel count is reduced, the driver tears down NAPI resources for the removed receive queues but leaves stale XDP program pointers in those queues. If the XDP program is subsequently detached or replaced, the program's reference count drops to zero and it is freed, yet the removed queues still hold the dangling pointer. When channels are later increased again, NAPI is re-enabled on those queues and the freed program is executed, causing a use-after-free that the kernel trace shows as a fatal page fault in the receive path. The fix clears the XDP program pointer when a queue is torn down and refreshes it from the current device-wide program when a queue is re-enabled, ensuring no stale pointers survive across a resize cycle. The vulnerability is reachable by any user holding CAP_NET_ADMIN over the veth device, including unprivileged users operating inside a user namespace, making it particularly relevant for container and multi-tenant environments.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.15 | 5.15.222 | 7a8e143109ff |
| 6.1 | 5.15 | 6.1.189 | 1a5c5b9c64ba |
| 6.12 | 5.15 | 6.12.112 | 3c10a5dd0d38 |
| 6.18 | 5.15 | 6.18.55 | 25bb7c362252 |
| 6.6 | 5.15 | 6.6.158 | f0e8dba8c224 |
| 7.2 | 5.15 | 7.2.9 | 43f6b647f209 |
| mainline | 5.15 | 7.3 | 7104a3707143 |
| cip/6.1 | 5.15 | 6.1.189-cip61 | 1a5c5b9c64ba |
| cip/6.1-rt | 5.15 | 6.1.189-cip61-rt32 | 1a5c5b9c64ba |
| cip/6.12 | 5.15 | 6.12.112-cip33 | 3c10a5dd0d38 |
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.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |