bpf: Keep target extended until its last freplace link detaches

Summary

CVECVE-2026-139635
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:19:46 UTC
Updated2026-11-30 14:19:46 UTC
DescriptionIn 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.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 987aa730bad3e1ef66d9f30182294daa78f6387d 49e6b0de165005abfbd167ba5e62076a4898b85e git Not specified
CNA Linux Linux affected d6083f040d5d8f8d748462c77e90547097df936e 0743d6510161be50143e52cb91fccd4868f7f048 git Not specified
CNA Linux Linux affected d6083f040d5d8f8d748462c77e90547097df936e 6403c2d2503edda61c24b75b178b62b558232a59 git Not specified
CNA Linux Linux affected d6083f040d5d8f8d748462c77e90547097df936e c43c348a84460b003fa757dd43d8c89848ae220d git Not specified
CNA Linux Linux affected 272f92998cbec9e12fea8ef28f48d6b1bc625a34 git Not specified
CNA Linux Linux affected f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6 git Not specified
CNA Linux Linux affected 6.12.5 6.12.120 semver Not specified
CNA Linux Linux affected 6.1.191 6.2 semver Not specified
CNA Linux Linux affected 6.6.160 6.7 semver Not specified
CNA Linux Linux affected 6.13 Not specified
CNA Linux Linux unaffected 6.13 semver Not specified
CNA Linux Linux unaffected 6.12.120 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.66 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.6 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/c43c348a84460b003fa757dd43d8c89848ae220d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/49e6b0de165005abfbd167ba5e62076a4898b85e 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/6403c2d2503edda61c24b75b178b62b558232a59 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/0743d6510161be50143e52cb91fccd4868f7f048 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report