CVE-2026-142942
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 versions
Linux kernel versions
7.2
and later are affected. Fixed in
7.3.6,
7.4-rc1
and their respective stable series.
References
2 totalFrequently asked questions
-
What is CVE-2026-142942?
CVE-2026-142942 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 7.2 onward and has been patched in 7.3.6 and 7.4-rc1. CVE-2026-142942 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
Is there a patch available for CVE-2026-142942?
Yes. CVE-2026-142942 has been patched. Fixed versions include 7.3.6 and 7.4-rc1. If you are running Linux kernel 7.2 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-142942 actively exploited?
No. CVE-2026-142942 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.