AZL-117259: CVE-2026-139621 affecting package kernel 6.6.161.1-1
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 bpfiternext() 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. statesequal() matches ids through idmap, so the same is concluded for an iterator that was destroyed and created again since the old state:
bpfiternumnew(&it, 0, 10); loop: if (bpfktimegetns()) goto remake; next: if (!bpfiternumnext(&it)) goto out; goto loop; remake: bpfiternumdestroy(&it); bpfiternumnew(&it, 0, 10); goto next;
Such prog is accepted when the call of bpfiternumnext() is the first prune point after bpfiternumnew() and it never returns. Otherwise it's rejected with "infinite loop detected".
Require the iterator to have the same id in both states.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for exploitation?
An attacker would need to load a specially crafted eBPF program that creates, destroys, and recreates an iterator in a loop. The issue depends on the BPF verifier incorrectly treating the newly created iterator as equivalent to a previously explored state.
What is the observable impact of a successful exploit?
The crafted program can be accepted by the verifier even though it never returns, resulting in an infinite loop. The provided data does not describe additional impacts such as privilege escalation or information disclosure.
How can I determine whether a program is affected?
Review eBPF programs for loops that destroy and recreate BPF iterators before calling bpf_iter_*_next(). A relevant pattern is one where bpf_iter_num_next() is the first verifier prune point after bpf_iter_num_new(), allowing the program to be accepted despite non-termination.