{"api_version":"1","generated_at":"2026-12-03T06:04:44+00:00","cve":"CVE-2026-138942","urls":{"html":"https://cve.report/CVE-2026-138942","api":"https://cve.report/api/cve/CVE-2026-138942.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138942","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138942"},"summary":{"title":"powerpc64/bpf: fix percpu private stack leak on JIT failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc64/bpf: fix percpu private stack leak on JIT failure\n\nThe existing conditional statement in bpf_int_jit_compile() frees the\npercpu private stack at out_addrs only when the image buffer was never\nallocated.\n\nIf bpf_jit_build_body() fails during a code-generation pass, the\nimage buffer has already been allocated, so !image is false and the\npercpu stack is not freed.\n\nBecause JIT compilation failed, fp->jited remains at 0. The subsequent\nbpf_jit_free() path only frees priv_stack_ptr when fp->jited is set, so\nfreeing is skipped here too, leaking the percpu allocation.\n\nFix implements freeing the private stack whenever fp->jited was not set,\ni.e. compilation did not succeed, instead of keying off !image. !fp->jited\nalready covers the !image case, since image is only NULL on early-failure\npaths where fp->jited is likewise 0.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:55","updated_at":"2026-11-30 14:17:55"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/67511cced5a1b9e4f1787b0ea1e53ca076f42639","name":"https://git.kernel.org/stable/c/67511cced5a1b9e4f1787b0ea1e53ca076f42639","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/24affb84d98e6b37b276aa57e5dd25ad93458cea","name":"https://git.kernel.org/stable/c/24affb84d98e6b37b276aa57e5dd25ad93458cea","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138942","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138942","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 156d985123b6d6e5189cfd0286b93c12167ae798 67511cced5a1b9e4f1787b0ea1e53ca076f42639 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 156d985123b6d6e5189cfd0286b93c12167ae798 24affb84d98e6b37b276aa57e5dd25ad93458cea git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 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":["arch/powerpc/net/bpf_jit_comp.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"67511cced5a1b9e4f1787b0ea1e53ca076f42639","status":"affected","version":"156d985123b6d6e5189cfd0286b93c12167ae798","versionType":"git"},{"lessThan":"24affb84d98e6b37b276aa57e5dd25ad93458cea","status":"affected","version":"156d985123b6d6e5189cfd0286b93c12167ae798","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/powerpc/net/bpf_jit_comp.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.1"},{"lessThan":"7.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","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.4","versionStartIncluding":"7.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"7.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc64/bpf: fix percpu private stack leak on JIT failure\n\nThe existing conditional statement in bpf_int_jit_compile() frees the\npercpu private stack at out_addrs only when the image buffer was never\nallocated.\n\nIf bpf_jit_build_body() fails during a code-generation pass, the\nimage buffer has already been allocated, so !image is false and the\npercpu stack is not freed.\n\nBecause JIT compilation failed, fp->jited remains at 0. The subsequent\nbpf_jit_free() path only frees priv_stack_ptr when fp->jited is set, so\nfreeing is skipped here too, leaking the percpu allocation.\n\nFix implements freeing the private stack whenever fp->jited was not set,\ni.e. compilation did not succeed, instead of keying off !image. !fp->jited\nalready covers the !image case, since image is only NULL on early-failure\npaths where fp->jited is likewise 0."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:26:24.902Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/67511cced5a1b9e4f1787b0ea1e53ca076f42639"},{"url":"https://git.kernel.org/stable/c/24affb84d98e6b37b276aa57e5dd25ad93458cea"}],"title":"powerpc64/bpf: fix percpu private stack leak on JIT failure","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138942","datePublished":"2026-11-30T13:26:24.902Z","dateReserved":"2026-11-30T13:22:15.904Z","dateUpdated":"2026-11-30T13:26:24.902Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:55","lastModifiedDate":"2026-11-30 14:17:55","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138942","Ordinal":"1","Title":"powerpc64/bpf: fix percpu private stack leak on JIT failure","CVE":"CVE-2026-138942","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138942","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc64/bpf: fix percpu private stack leak on JIT failure\n\nThe existing conditional statement in bpf_int_jit_compile() frees the\npercpu private stack at out_addrs only when the image buffer was never\nallocated.\n\nIf bpf_jit_build_body() fails during a code-generation pass, the\nimage buffer has already been allocated, so !image is false and the\npercpu stack is not freed.\n\nBecause JIT compilation failed, fp->jited remains at 0. The subsequent\nbpf_jit_free() path only frees priv_stack_ptr when fp->jited is set, so\nfreeing is skipped here too, leaking the percpu allocation.\n\nFix implements freeing the private stack whenever fp->jited was not set,\ni.e. compilation did not succeed, instead of keying off !image. !fp->jited\nalready covers the !image case, since image is only NULL on early-failure\npaths where fp->jited is likewise 0.","Type":"Description","Title":"powerpc64/bpf: fix percpu private stack leak on JIT failure"}]}}}