CVE-2026-139621

bpf: Don't converge a loop on an iterator that was created anew

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 converge a loop on an iterator that was created anew

When the verifier reaches bpf_iter_*_next() in a state that is equal to
a state that is still being explored it concludes that the loop
converged, since an active iterator will be drained eventually.
states_equal() matches ids through idmap, so the same is concluded for
an iterator that was destroyed and created again since the old state:

bpf_iter_num_new(&it, 0, 10);
loop:
if (bpf_ktime_get_ns())
goto remake;
next:
if (!bpf_iter_num_next(&it))
goto out;
goto loop;
remake:
bpf_iter_num_destroy(&it);
bpf_iter_num_new(&it, 0, 10);
goto next;

Such prog is accepted when the call of bpf_iter_num_next() is the first
prune point after bpf_iter_num_new() and it never returns. Otherwise
it's rejected with "infinite loop detected".

Require the iterator to have the same id in both states.

Analysis

AI-generated

Technical impact

The vulnerability originates from a logic flaw in the Linux kernel eBPF verifier, where iterator state equality does not correctly differentiate between a destroyed and recreated iterator. When an iterator is regenerated with the same identifier, the verifier can mistakenly treat the new state as equal to an old state that was still being explored. This misjudgement allows a malicious BPF program containing an infinite loop to be considered convergent and accepted. Once loaded, the program can exhaust kernel resources or bypass verifier checks, resulting in a denial of service or other integrity violations.

Affected Systems

All Linux kernel implementations are impacted, as indicated by the CNA vendor record for "Linux:Linux". Any kernel build that predates the commit that resolves the iterator state comparison flaw is vulnerable.

Risk and Exploitability

The CVSS data is unavailable and no EPSS score has been provided; the vulnerability is not listed in the CISA KEV catalog. These factors suggest that an attacker has had limited opportunity to exploit the flaw in the wild. However, the impact of a successful exploitation is high: an attacker with sufficient privileges to load eBPF programs (root or a privileged user) could trigger the infinite loop and degrade kernel availability. The risk is therefore considered moderate to high depending on the presence of privileged users who can deploy BPF programs, with the probability of exploitation currently low but not negligible.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the system to a kernel version that incorporates the commit which corrects iterator state comparison in the eBPF verifier.
  • If an immediate kernel upgrade is not feasible, constrain the ability of untrusted users to load eBPF programs by applying kernel security controls such as SELinux, AppArmor, or disabling the bpf() system call via seccomp policies.
  • Continuously monitor kernel logs for unusual bpf() activity or errors that may indicate a malicious program that bypassed the verifier.

Generated by OpenCVE AI on November 30, 2026 at 23:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-605
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Don't converge a loop on an iterator that was created anew When the verifier reaches bpf_iter_*_next() in a state that is equal to a state that is still being explored it concludes that the loop converged, since an active iterator will be drained eventually. states_equal() matches ids through idmap, so the same is concluded for an iterator that was destroyed and created again since the old state: bpf_iter_num_new(&it, 0, 10); loop: if (bpf_ktime_get_ns()) goto remake; next: if (!bpf_iter_num_next(&it)) goto out; goto loop; remake: bpf_iter_num_destroy(&it); bpf_iter_num_new(&it, 0, 10); goto next; Such prog is accepted when the call of bpf_iter_num_next() is the first prune point after bpf_iter_num_new() and it never returns. Otherwise it's rejected with "infinite loop detected". Require the iterator to have the same id in both states.
Title bpf: Don't converge a loop on an iterator that was created anew
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-605

    Multiple Binds to the Same Port

Sources

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