Security mailing lists by PureSourceCode

CVE-2026-142942

not scored yet

bpf: Destroy callee-local dynptrs on subprog return

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.

Published
3 Dec 2026
Last modified
3 Dec 2026
Assigned by
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Received
Sources
NVDJSONCVE ListJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
CVE List Linux Linux >= 308c7a0ae8859b34d9d90a3dff953b2d14242145, < abf9f320f9d615358a768aa7b238dbedb79f566c; >= 308c7a0ae8859b34d9d90a3dff953b2d14242145, < b65cc81792eb07436879d9f0be8ebd18a78fffb4 abf9f320f9d615358a768aa7b238dbedb79f566c, b65cc81792eb07436879d9f0be8ebd18a78fffb4
CVE List Linux Linux = 7.2

References

History

  • 3 Dec 2026 05:06 UTC · NVD: first stored (published 3 Dec 2026)
  • 3 Dec 2026 04:06 UTC · CVE List: first stored (published 3 Dec 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.