CVE-2026-142942
Last modified
CVE-2026-142942 is a vulnerability of currently unknown severity. In the Linux kernel, the following vulnerability has been resolved: bpf: Destroy callee-local dynptrs on subprog return A data slice is valid only while the specific dynptr that produced it remains valid. prepare_func_exit() copies a subprogram return value into the caller and then frees the callee state without applying the normal destruction semantics to dynptrs in the callee stack. A callee can therefore derive a slice from a local dynptr, return or spill the slice into its caller, and then let the dynptr disappear with the callee frame.
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Destroy callee-local dynptrs on subprog return A data slice is valid only while the specific dynptr that produced it remains valid. prepare_func_exit() copies a subprogram return value into the caller and then frees the callee state without applying the normal destruction semantics to dynptrs in the callee stack. A callee can therefore derive a slice from a local dynptr, return or spill the slice into its caller, and then let the dynptr disappear with the callee frame. The slice retains the id of a dynptr that is no longer in the verifier state, so the verifier continues to accept accesses through it. Before the object relationship refactor, bpf_dynptr_data() slices from referenced dynptrs also carried the shared reference id, allowing a later release to catch some of these escaped slices. The refactor made those slices precise children of their source dynptr and exposed the missing teardown as an accepted stale access even after the shared resource is released. Add destroy_dynptrs_in_stack_slots() to apply the existing dynptr teardown to an inclusive range of stack slots. Reuse it for dynptr initialization, variable-offset stack writes, and the entire callee stack before freeing the frame. The teardown rejects losing the last dynptr for a referenced resource and invalidates the dynptr and all its descendants, including slices held in the caller. Propagate errors through prepare_func_exit(). Reuse the existing teardown API and diagnostic. Update the affected callback test expectation in this change so the commit remains test-clean.
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | >= 308c7a0ae8859b34d9d90a3dff953b2d14242145, < abf9f320f9d615358a768aa7b238dbedb79f566c; >= 308c7a0ae8859b34d9d90a3dff953b2d14242145, < b65cc81792eb07436879d9f0be8ebd18a78fffb4 |
| Linux | Linux | 7.2 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-142942?
How severe is CVE-2026-142942?
How do I fix CVE-2026-142942?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-142936In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142937In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142938In the Linux kernel, the following vulnerability has been re…8.4
- CVE-2026-142939In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142940In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142941In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142943In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142944In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142945In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142946In the Linux kernel, the following vulnerability has been re…7.4
- CVE-2026-142947In the Linux kernel, the following vulnerability has been re…
- CVE-2026-142948In the Linux kernel, the following vulnerability has been re…
Are you affected by CVE-2026-142942?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
