# CVE-2026-139609: bpf: Avoid quadratic successor rescan in bpf_compute_scc

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-11-30T13:36:19.987Z
- Modified: 2026-11-30T14:19:43.323Z
- Assigned by: Linux

## Description

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

bpf: Avoid quadratic successor rescan in bpf_compute_scc

The iterative Tarjan DFS in bpf_compute_scc() emulates recursion with an
explicit 'dfs' stack: when a successor has not been visited yet, the
successor is pushed and the walk restarts at the top of the loop. On the
way back to a vertex the successor scan starts over at index zero, so a
vertex with k successors rescans up to k successors on each of its up to k
descents, i.e. O(k^2) work.

For ordinary instructions k <= 2 and this is irrelevant. For a gotox the
successors are the jump table of the containing subprogram, whose size is
bounded only by the max_entries of the insn_array map, so k can reach the
1M instruction complexity limit. Loading such a program keeps a CPU busy
in the loop for a very long time before verification even begins.

Record in 'dfs_pos' the successor index each frame stopped at and resume
the scan there. Each edge is therefore examined a bounded number of times
and the walk becomes linear in the number of edges.

(As written by CVE List.)

## Affected

- Linux Linux: from 493d9e0d608339a32f568504d5fd411a261bb0af before 52d22cb53e0ec27c898e5921f6bab93df69d65ee; from 493d9e0d608339a32f568504d5fd411a261bb0af before 3852e19cb9547ffdf9e3fbf3c8decd2c78c85217; 6.19 (not affected: before 6.19; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/52d22cb53e0ec27c898e5921f6bab93df69d65ee>
- <https://git.kernel.org/stable/c/3852e19cb9547ffdf9e3fbf3c8decd2c78c85217>

## Sources

- CVE List: [CVE-2026-139609](https://www.cve.org/CVERecord?id=CVE-2026-139609), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139609](https://nvd.nist.gov/vuln/detail/CVE-2026-139609), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139609 · Whole record: https://cve.day/CVE-2026-139609.json · Rebuilt by cve.day 2026-11-30T14:33:08.444Z
