CVE-2026-139607: bpf: Rebase the exception callback subprog when dead subprogs are removed
In the Linux kernel, the following vulnerability has been resolved:
bpf: Rebase the exception callback subprog when dead subprogs are removed
adjustsubprogstartsafterremove() compacts subproginfo[] and the funcinfo when whole subprograms are removed as dead code, but leaves env->exceptioncallbacksubprog alone, so an exception callback declared through the exceptioncallback decl tag which sits behind a removed subprogram keeps its old index. jitsubprogs() then takes the exception callback from func[] at that index, which is past the end when the callback was the last subprogram, or another subprogram otherwise.
Rebase the index along with the entries it refers to.
Affected Software
Event History
Frequently Asked Questions
What conditions are needed to trigger the issue?
The BPF program must declare an exception callback through the exception_callback declaration tag, and dead-code removal must remove one or more whole subprograms before that callback. The callback is particularly affected when it is the final subprogram, though an outdated index can also select a different subprogram.
What can happen when the stale callback index is used?
During JIT subprogram processing, the kernel can select func[] using the old index. This can reference an entry past the end of the array when the callback was last, or reference another subprogram when it was not.
What is the available remediation?
Apply a Linux kernel update containing the referenced stable fixes. The correction rebases the exception callback subprogram index when dead subprogram removal compacts the subprogram metadata.