{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "156d985123b6d6e5189cfd0286b93c12167ae798"
            },
            {
              "fixed": "67511cced5a1b9e4f1787b0ea1e53ca076f42639"
            },
            {
              "fixed": "24affb84d98e6b37b276aa57e5dd25ad93458cea"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "7.1.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138942.json"
  },
  "details": "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-\u003ejited remains at 0. The subsequent\nbpf_jit_free() path only frees priv_stack_ptr when fp-\u003ejited is set, so\nfreeing is skipped here too, leaking the percpu allocation.\n\nFix implements freeing the private stack whenever fp-\u003ejited was not set,\ni.e. compilation did not succeed, instead of keying off !image. !fp-\u003ejited\nalready covers the !image case, since image is only NULL on early-failure\npaths where fp-\u003ejited is likewise 0.",
  "id": "CVE-2026-138942",
  "modified": "2026-11-30T14:46:05.675664958Z",
  "published": "2026-11-30T13:26:24.902Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/24affb84d98e6b37b276aa57e5dd25ad93458cea"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/67511cced5a1b9e4f1787b0ea1e53ca076f42639"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138942.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138942"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "powerpc64/bpf: fix percpu private stack leak on JIT failure"
}