{"api_version":"1","generated_at":"2026-12-03T05:42:38+00:00","cve":"CVE-2026-142942","urls":{"html":"https://cve.report/CVE-2026-142942","api":"https://cve.report/api/cve/CVE-2026-142942.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-142942","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-142942"},"summary":{"title":"bpf: Destroy callee-local dynptrs on subprog return","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Destroy callee-local dynptrs on subprog return\n\nA data slice is valid only while the specific dynptr that produced it\nremains valid. prepare_func_exit() copies a subprogram return value into\nthe caller and then frees the callee state without applying the normal\ndestruction semantics to dynptrs in the callee stack.\n\nA callee can therefore derive a slice from a local dynptr, return or spill\nthe slice into its caller, and then let the dynptr disappear with the\ncallee frame. The slice retains the id of a dynptr that is no longer in the\nverifier state, so the verifier continues to accept accesses through it.\n\nBefore the object relationship refactor, bpf_dynptr_data() slices from\nreferenced dynptrs also carried the shared reference id, allowing a later\nrelease to catch some of these escaped slices. The refactor made those\nslices precise children of their source dynptr and exposed the missing\nteardown as an accepted stale access even after the shared resource is\nreleased.\n\nAdd destroy_dynptrs_in_stack_slots() to apply the existing dynptr teardown\nto an inclusive range of stack slots. Reuse it for dynptr initialization,\nvariable-offset stack writes, and the entire callee stack before freeing\nthe frame. The teardown rejects losing the last dynptr for a referenced\nresource and invalidates the dynptr and all its descendants, including\nslices held in the caller. Propagate errors through prepare_func_exit().\n\nReuse the existing teardown API and diagnostic. Update the affected\ncallback test expectation in this change so the commit remains test-clean.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 04:18:35","updated_at":"2026-12-03 04:18:35"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/abf9f320f9d615358a768aa7b238dbedb79f566c","name":"https://git.kernel.org/stable/c/abf9f320f9d615358a768aa7b238dbedb79f566c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/b65cc81792eb07436879d9f0be8ebd18a78fffb4","name":"https://git.kernel.org/stable/c/b65cc81792eb07436879d9f0be8ebd18a78fffb4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-142942","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142942","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 308c7a0ae8859b34d9d90a3dff953b2d14242145 abf9f320f9d615358a768aa7b238dbedb79f566c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 308c7a0ae8859b34d9d90a3dff953b2d14242145 b65cc81792eb07436879d9f0be8ebd18a78fffb4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/bpf/verifier.c","tools/testing/selftests/bpf/progs/dynptr_fail.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"abf9f320f9d615358a768aa7b238dbedb79f566c","status":"affected","version":"308c7a0ae8859b34d9d90a3dff953b2d14242145","versionType":"git"},{"lessThan":"b65cc81792eb07436879d9f0be8ebd18a78fffb4","status":"affected","version":"308c7a0ae8859b34d9d90a3dff953b2d14242145","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/bpf/verifier.c","tools/testing/selftests/bpf/progs/dynptr_fail.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.2"},{"lessThan":"7.2","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"7.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"7.2","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Destroy callee-local dynptrs on subprog return\n\nA data slice is valid only while the specific dynptr that produced it\nremains valid. prepare_func_exit() copies a subprogram return value into\nthe caller and then frees the callee state without applying the normal\ndestruction semantics to dynptrs in the callee stack.\n\nA callee can therefore derive a slice from a local dynptr, return or spill\nthe slice into its caller, and then let the dynptr disappear with the\ncallee frame. The slice retains the id of a dynptr that is no longer in the\nverifier state, so the verifier continues to accept accesses through it.\n\nBefore the object relationship refactor, bpf_dynptr_data() slices from\nreferenced dynptrs also carried the shared reference id, allowing a later\nrelease to catch some of these escaped slices. The refactor made those\nslices precise children of their source dynptr and exposed the missing\nteardown as an accepted stale access even after the shared resource is\nreleased.\n\nAdd destroy_dynptrs_in_stack_slots() to apply the existing dynptr teardown\nto an inclusive range of stack slots. Reuse it for dynptr initialization,\nvariable-offset stack writes, and the entire callee stack before freeing\nthe frame. The teardown rejects losing the last dynptr for a referenced\nresource and invalidates the dynptr and all its descendants, including\nslices held in the caller. Propagate errors through prepare_func_exit().\n\nReuse the existing teardown API and diagnostic. Update the affected\ncallback test expectation in this change so the commit remains test-clean."}],"providerMetadata":{"dateUpdated":"2026-12-03T03:26:11.488Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/abf9f320f9d615358a768aa7b238dbedb79f566c"},{"url":"https://git.kernel.org/stable/c/b65cc81792eb07436879d9f0be8ebd18a78fffb4"}],"title":"bpf: Destroy callee-local dynptrs on subprog return","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-142942","datePublished":"2026-12-03T03:26:11.488Z","dateReserved":"2026-12-03T03:10:28.338Z","dateUpdated":"2026-12-03T03:26:11.488Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 04:18:35","lastModifiedDate":"2026-12-03 04:18:35","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"142942","Ordinal":"1","Title":"bpf: Destroy callee-local dynptrs on subprog return","CVE":"CVE-2026-142942","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"142942","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Destroy callee-local dynptrs on subprog return\n\nA data slice is valid only while the specific dynptr that produced it\nremains valid. prepare_func_exit() copies a subprogram return value into\nthe caller and then frees the callee state without applying the normal\ndestruction semantics to dynptrs in the callee stack.\n\nA callee can therefore derive a slice from a local dynptr, return or spill\nthe slice into its caller, and then let the dynptr disappear with the\ncallee frame. The slice retains the id of a dynptr that is no longer in the\nverifier state, so the verifier continues to accept accesses through it.\n\nBefore the object relationship refactor, bpf_dynptr_data() slices from\nreferenced dynptrs also carried the shared reference id, allowing a later\nrelease to catch some of these escaped slices. The refactor made those\nslices precise children of their source dynptr and exposed the missing\nteardown as an accepted stale access even after the shared resource is\nreleased.\n\nAdd destroy_dynptrs_in_stack_slots() to apply the existing dynptr teardown\nto an inclusive range of stack slots. Reuse it for dynptr initialization,\nvariable-offset stack writes, and the entire callee stack before freeing\nthe frame. The teardown rejects losing the last dynptr for a referenced\nresource and invalidates the dynptr and all its descendants, including\nslices held in the caller. Propagate errors through prepare_func_exit().\n\nReuse the existing teardown API and diagnostic. Update the affected\ncallback test expectation in this change so the commit remains test-clean.","Type":"Description","Title":"bpf: Destroy callee-local dynptrs on subprog return"}]}}}