bpf: Leave out the hidden exit edge of a subprogram without an exit
- CVE-2026-139606
- GHSA-w7wr-fm97-j7qj
- EUVD-2026-139312
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Leave out the hidden exit edge of a subprogram without an exit visit_abnormal_return_insn() gives tail_call and ld_{abs,ind} insns a second successor, the exit_idx of their subprogram, so that the hidden exit from the subprogram is part of the CFG. check_subprogs() only assigns exit_idx when it walks over a BPF_EXIT, and a subprogram whose last insn jumps back into itself never has one, so exit_idx stays zero and the edge points at insn 0 of the program: 0: r0 = 0 1: r0 = *(u8 *)skb[0] 2: goto -2 For a subprogram other than main, update_insn() then reads the liveness masks at a negative relative index. Such a subprogram can still load when it leaves through a bpf_throw(), so mark exit_idx as unset in that case and leave the hidden edge out, as there is no exit for it to reach.
Text from the CVE.org record.
Recommendation
Linux
- If you run a version from 6.12.101 to before 6.13update to 6.13 or laterMinor version change: check the release notes
- If you run a version from 6.6.148 to before 6.7update to 6.7 or laterMinor version change: check the release notes
- If you run a version from 6.1.183 to before 6.2update to 6.2 or laterMinor version change: check the release notes
- If you run a version from 5.15.216 to before 5.16update to 5.16 or laterMinor version change: check the release notes
- If you run a version from 5.10.265 to before 5.11update to 5.11 or laterMinor version change: check the release notes
Some affected versions have no stated fix.
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Linux
Affected versions Fixed in from 6.12.101 to before 6.13 6.13 from 6.6.148 to before 6.7 6.7 from 6.1.183 to before 6.2 6.2 from 5.15.216 to before 5.16 5.16 from 5.10.265 to before 5.11 5.11 from 6.18.42 to before 6.19 none stated 6.19 none stated before 6.19: not affected none stated and 2 more
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.