CVE-2026-139292: bpf: Let bpf_dynptr_write() mark a global function
In the Linux kernel, the following vulnerability has been resolved:
bpf: Let bpfdynptrwrite() mark a global function
The caller of a global function loses its packet pointers if the function may change packet data. That is found out by a scan for calls of the helpers which bpfhelperchangespktdata() lists.
bpfdynptrwrite() is not on the list, because it depends on the type of the dynptr: checkhelpercall() looks at it. The scan cannot do that, and so a global function which makes a dynptr from the skb, or gets one as an argument, and writes through it counts as harmless. The write can reallocate the head of the skb, and the caller goes on with pointers into the old one, which has been freed.
Let every call of bpfdynptrwrite() mark the function, as a tail call does. The same mark decides whether a program may replace a function.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.7 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1
Event History
Frequently Asked Questions
Which BPF program patterns should be prioritized for review?
Review global BPF functions that create a dynptr from an skb, or receive such a dynptr as an argument, and call bpf_dynptr_write(). They are relevant when their callers retain packet pointers across the function call.
What unsafe state can result from the affected verifier behavior?
A dynptr write can reallocate the skb head. If the caller continues using packet pointers into the previous head, it can access memory that has already been freed.
What does the resolution change in verifier handling?
The resolution makes every call to bpf_dynptr_write() mark the containing function as potentially changing packet data, similarly to a tail call. That mark also determines whether a program may replace a function.