KernelScan.io

HIGH Introduced in 6.3

bpf OffloadMatch Bypass

CVE-2026-98382

CVSS 7.8 / 10.0 NVD

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

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject dev-bound-only programs on other devices __bpf_offload_dev_match() falls back to comparing offdev pointers after an exact netdev mismatch. Bound-only programs normally have NULL offdevs, so unrelated netdevs compare equal. A bound-only program on an offload-registered netdev can instead inherit a real offdev and match a sibling port. With CAP_BPF and CAP_NET_ADMIN, a caller can use bpf(BPF_LINK_CREATE) with a different target ifindex to run metadata kfuncs specialized for the bound driver on the target driver's xdp_buff. Running a veth-bound program on tun reads beyond tun's bare stack xdp_buff as a veth_xdp_buff. Oops: general protection fault, probably for non-canonical address KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] RIP: 0010:veth_xdp_rx_timestamp (drivers/net/veth.c:1673) Call Trace: ... tun_build_skb (drivers/net/tun.c:1739) tun_get_user (drivers/net/tun.c:1856) tun_chr_write_iter (drivers/net/tun.c:2091) vfs_write (fs/read_write.c:595 fs/read_write.c:687) ksys_write (fs/read_write.c:739) do_syscall_64 (arch/x86/entry/syscall_64.c:84) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) Kernel panic - not syncing: Fatal exception in interrupt Restrict non-offloaded programs to exact netdev matches and retain the shared-offdev fallback only for genuinely offloaded multi-port programs.

02

Engine v0.7.0

Risk summary

A local attacker with CAP_BPF and CAP_NET_ADMIN (obtainable in a user namespace) can load a BPF program bound to one virtual network device and attach it to a different device type. The program then interprets the target device's smaller buffer as the bound driver's larger structure, causing an out-of-bounds read or kernel panic. This affects any system running kernel 6.3 or later with unprivileged user namespaces and BPF enabled.

Affectedkernel/bpf/offload.c (bpf offload subsystem)

Vulnerability analysis

The logic that matches BPF programs to network offload devices falls back to comparing internal device handles when an exact network interface match fails. Programs that are bound to a device but not actually offloaded normally have empty handles, so unrelated interfaces can incorrectly compare as equal; a bound program on an offload-registered interface can also inherit a real handle from a sibling port and match the wrong device. An attacker with the required capabilities, both obtainable inside an unprivileged user namespace, can load a program specialized for one virtual network device and attach it to a different device type. The attached program then runs driver-specific helper functions that interpret the target device's smaller packet buffer as the bound driver's larger structure, reading beyond its actual bounds and causing a kernel panic or potential memory disclosure. The fix restricts the shared-handle fallback to genuinely offloaded multi-port programs, requiring an exact interface match for all other programs.

03

BranchIntroducedFixed inPatch commit
6.126.36.12.1120dceda331180
6.186.36.18.55940b626854de
6.66.36.6.158e57f04194361
7.26.37.2.9bb375f3c5990
mainline6.37.36db1ce73e985
cip/6.126.36.12.112-cip330dceda331180

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.112-cip33