CVE-2026-139635: bpf: Keep target extended until its last freplace link detaches

Published Nov 30, 2026
·
Updated

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

bpf: Keep target extended until its last freplace link detaches

The isextended / progarraymembercnt protocol introduced by commit d6083f040d5d ("bpf: Prevent tailcall infinite loop caused by freplace") keeps a prog extended by a freplace program out of progarray maps, and vice versa: once a tail call re-enters an extended subprogram, its tailcallcnt resets on every execution and the loop never terminates.

But isextended 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. bpftrampolineunlinkprog() cleared isextended whenever any freplace link detached, so detaching one of two links re-armed the unbounded loop through the remaining one.

Replace the isextended 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 bpffreplacechecktgtprog() to bpffreplacelinktgtprog(), as the helper has never been a pure check: it reserves the target prog on success.

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger the unbounded tail-call loop?

A target BPF program must have multiple freplace links attached, including links that can target its entry and a global subprogram. The issue is triggered when one freplace link is detached while another remains, allowing the target to be treated as no longer extended and re-entered through a tail call.

2

What is the practical impact of detaching only one freplace link?

Detaching any one freplace link could clear the target program's extended state even when other freplace links were still attached. A tail call that re-enters the still-extended subprogram could then repeatedly reset its tail-call counter, causing a loop that does not terminate.

3

How does the fix prevent the issue?

The fix replaces the single is_extended boolean with a count of freplace links attached to each target program. The target remains marked extended until its final freplace link is detached.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203