cvelo
P4 · InfoEPSS 0.2%

bpf: Keep target extended until its last freplace link detaches

  • CVE-2026-139635
  • GHSA-8fpg-9c43-f25h
  • EUVD-2026-139341

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Keep target extended until its last freplace link detaches The is_extended / prog_array_member_cnt protocol introduced by commit d6083f040d5d ("bpf: Prevent tailcall infinite loop caused by freplace") keeps a prog extended by a freplace program out of prog_array maps, and vice versa: once a tail call re-enters an extended subprogram, its tail_call_cnt resets on every execution and the loop never terminates. But is_extended is a plain boolean, while one target prog can carry several freplace links at the same time, one on its entry and one on a global subprogram. __bpf_trampoline_unlink_prog() cleared is_extended whenever *any* freplace link detached, so detaching one of two links re-armed the unbounded loop through the remaining one. Replace the is_extended boolean with a count of the freplace links attached to each target prog, so the target stays extended until its last link detaches. Also rename bpf_freplace_check_tgt_prog() to bpf_freplace_link_tgt_prog(), as the helper has never been a pure check: it reserves the target prog on success.

Text from the CVE.org record.

Recommendation

  • Linux

    • If you run 6.12.xupdate to 6.12.120 or laterPatch update: breaking changes are unlikely
    • If you run a version from 6.6.160 to before 6.7update to 6.7 or laterMinor version change: check the release notes
    • If you run a version from 6.1.191 to before 6.2update to 6.2 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 versionsFixed in
    from 6.12.5 to before 6.12.1206.12.120
    from 6.6.160 to before 6.76.7
    from 6.1.191 to before 6.26.2
    6.13none stated
    before 6.13: not affectednone stated
    from 6.12.120 up to 6.12.*: not affectednone stated
    from 6.18.66 up to 6.18.*: not affectednone stated
    from 7.3.6 up to 7.3.*: not affectednone stated

    and 1 more

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.