# CVE-2026-98382: bpf: Reject dev-bound-only programs on other devices

> A local attacker with high privileges can trigger a kernel panic by attaching a BPF program to a mismatched network device, causing a null pointer dereference.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Oct 2026
- **Updated:** 24 Oct 2026
- **Also known as:** AZL-106902, BELL-CVE-2026-98382, DEBIAN-CVE-2026-98382, GHSA-vw7w-8mp5-cr53, UBUNTU-CVE-2026-98382

## What is CVE-2026-98382?

CVE-2026-98382 is a high-severity vulnerability in Linux, published on 9 Oct 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

## Which versions are affected by CVE-2026-98382?


## How do I fix CVE-2026-98382?

Apply the vendor's patch.

## Is CVE-2026-98382 being exploited?

There is no known exploitation of CVE-2026-98382 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-98382 and fix it if it is affected.

What it is: CVE-2026-98382 is a high-severity vulnerability in Linux, published on 9 Oct 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-98382 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-98382/ (Markdown: https://insights.sbomify.com/CVE-2026-98382/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-98382
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-98382
- OSV: https://osv.dev/vulnerability/CVE-2026-98382

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-98382/
Summaries are generated and may contain mistakes; the official description above is the record.
