CVE-2026-139307

bpf: Don't bind a program to a netdev that goes away

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Don't bind a program to a netdev that goes away

bpf_prog_dev_bound_init() looks the device up, takes bpf_devs_lock and
registers the device for the program. The reference it holds does not
keep the device registered. If bpf_dev_bound_netdev_unregister() has run
by the time the lock is taken, nobody takes the program off the device any
more: the bpf_offload_netdev and offload->netdev point to a net_device
that is freed as soon as the reference is dropped.
bpf_dev_bound_resolve_kfunc() dereferences it while the program is
verified, and a new device at the same address finds the old entry.

unregister_netdevice_many_notify() leaves NETREG_REGISTERED before it
calls bpf_dev_bound_netdev_unregister(), which takes bpf_devs_lock. Look
at reg_state under that lock, and treat a device that goes like one that
is not there.

Analysis

AI-generated

Technical impact

The Linux kernel vulnerability allows a BPF program to be bound to a network device that can be removed before the binding is fully established. When the device is unregistered after the binding lock is taken, the BPF reference does not keep the device registered, causing a freed net_device to remain referenced in BPF program structures. During program verification the code dereferences this pointer, creating a use‑after‑free condition that can crash the kernel or, if exploitable, allow execution of arbitrary code.

Affected Systems

Affected systems are all Linux kernel releases that have not incorporated the fix commit referenced in the advisory. No specific version numbers are supplied, so any kernel version prior to the commit remains vulnerable.

Risk and Exploitability

The CVSS score is not reported and the EPSS score is unavailable. Because the flaw involves a kernel‑level use‑after‑free, a local attacker with the ability to load BPF programs and manipulate network interfaces could trigger the vulnerability. While no public exploits are listed, the impact could be denial of service or privilege escalation. The vulnerability is not in the CISA KEV catalog, but the risk for unpatched systems remains high.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel update that contains the committed fix for the BPF netdev binding issue.
  • Avoid binding BPF programs to network devices that may be removed during operation or use a static network device that remains alive for the life of the program.
  • If a kernel upgrade is not immediately possible, monitor for kernel panics or crashes related to BPF programs and consider disabling dynamic BPF program loading until a patch is available.

Generated by OpenCVE AI on November 30, 2026 at 21:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Don't bind a program to a netdev that goes away bpf_prog_dev_bound_init() looks the device up, takes bpf_devs_lock and registers the device for the program. The reference it holds does not keep the device registered. If bpf_dev_bound_netdev_unregister() has run by the time the lock is taken, nobody takes the program off the device any more: the bpf_offload_netdev and offload->netdev point to a net_device that is freed as soon as the reference is dropped. bpf_dev_bound_resolve_kfunc() dereferences it while the program is verified, and a new device at the same address finds the old entry. unregister_netdevice_many_notify() leaves NETREG_REGISTERED before it calls bpf_dev_bound_netdev_unregister(), which takes bpf_devs_lock. Look at reg_state under that lock, and treat a device that goes like one that is not there.
Title bpf: Don't bind a program to a netdev that goes away
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM