Skip to contentSkip to conversation

CVE-2026-90146: bpf, xdp: move offload check into dev_xdp_install()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

bpf, xdp: move offload check into dev_xdp_install()

bpf_xdp_link_update() calls dev_xdp_install() directly and skips dev_xdp_attach(), so the checks in dev_xdp_attach() do not run. A user can make an XDP link with a normal program and then swap in an offloaded or device-bound program with BPF_LINK_UPDATE, which puts it on the software path.

dev_xdp_install() is the one place all three paths go through:
"ip link set xdp" and BPF_LINK_CREATE reach it via dev_xdp_attach(), and BPF_LINK_UPDATE calls it directly. So move the program checks (offloaded, bound to another device, device-bound in generic mode, native vs generic, DEVMAP and CPUMAP) there, and keep only the netlink-flag check (XDP_FLAGS_UPDATE_IF_NOEXIST) in dev_xdp_attach().

The Linux kernel CVE team has assigned CVE-2026-90146 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.9 with commit 026a4c28e1db3b0cb99cd9a3e495d4a8b632fa74 and fixed in 6.18.52 with commit ea7b35dcc9430293b861bc7bad0c546f193c85f9
	Issue introduced in 5.9 with commit 026a4c28e1db3b0cb99cd9a3e495d4a8b632fa74 and fixed in 7.2.6 with commit 03022dd874070768a7099f18b1944c633641315f
	Issue introduced in 5.9 with commit 026a4c28e1db3b0cb99cd9a3e495d4a8b632fa74 and fixed in 7.3-rc1 with commit ad27ed7d2309419a129078d781504f486b1b469a

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-90146

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/core/dev.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/ea7b35dcc9430293b861bc7bad0c546f193c85f9
	https://git.kernel.org/stable/c/03022dd874070768a7099f18b1944c633641315f
	https://git.kernel.org/stable/c/ad27ed7d2309419a129078d781504f486b1b469a