CVE-2026-143449: bpf: Clear insn array jitted pointers on map reuse
In the Linux kernel, the following vulnerability has been resolved:
bpf: Clear insn array jitted pointers on map reuse
An insn array records, per entry, the xlated offset, the jitted offset and a jitted target pointer in ips[]. bpfinsnarrayinit() runs when the map is bound to a program and resets only xlatedoff; the jitted offset and the ips[] pointer are left as the previous owner set them. A program can be verified and JITed and only then fail to load (e.g. bpfchecktailcall()). By that point bpfprogupdateinsnptrs() has already filled ips[] with pointers into that program's JIT image. Thus, the map is handed back for reuse with the stale pointers intact. If the next program reuses the map, the stale pointer survives in the now active program's jump table, pointing into the previous, freed image. Fix by resetting the jitted offset and the ips[] pointer alongside the xlated offset.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
On map reuse, clear the insn array’s jitted pointers and reset the jitted offset in bpf_insn_array_init().
Event History
Frequently Asked Questions
What conditions are required for the stale pointer to become reachable?
A program must be verified and JIT-compiled, then fail during loading after bpf_prog_update_insn_ptrs() has populated the map's ips[] entries. The same map must subsequently be reused by another program, allowing the stale pointer to remain in that active program's jump table.
What is the impact of reusing an affected map?
The reused map can retain a jitted target pointer into the previous program's freed JIT image. The active program's jump table may therefore contain a pointer to freed code memory.
What does the fix change?
The fix clears the jitted offset and ips[] pointer when bpf_insn_array_init() initializes a map for a newly bound program. Previously, initialization reset only the translated offset, leaving JIT-related state from the prior map owner.