{
  "id": "CVE-2025-38502",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38502",
  "published_at": "2025-08-16T09:34:25.135Z",
  "title": "bpf: Fix oob access in cgroup local storage",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-09-11T18:56:40Z",
    "first_seen_at": "2026-11-14T14:50:35.824Z",
    "days_after_publication": 391.4,
    "repo": "abraxas/CVE-2025-38502-Linux-LPE",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix oob access in cgroup local storage\n\nLonial reported that an out-of-bounds access in cgroup local storage\ncan be crafted via tail calls. Given two programs each utilizing a\ncgroup local storage with a different value size, and one program\ndoing a tail call into the other. The verifier will validate each of\nthe indivial programs just fine. However, in the runtime context\nthe bpf_cg_run_ctx holds an bpf_prog_array_item which contains the\nBPF program as well as any cgroup local storage flavor the program\nuses. Helpers such as bpf_get_local_storage() pick this up from the\nruntime context:\n\n  ctx = container_of(current-\u003ebpf_ctx, struct bpf_cg_run_ctx, run_ctx);\n  storage = ctx-\u003eprog_item-\u003ecgroup_storage[stype];\n\n  if (stype == BPF_CGROUP_STORAGE_SHARED)\n    ptr = \u0026READ_ONCE(storage-\u003ebuf)-\u003edata[0];\n  else\n    ptr = this_cpu_ptr(storage-\u003epercpu_buf);\n\nFor the second program which was called from the originally attached\none, this means bpf_get_local_storage() will pick up the former\nprogram's map, not its own. With mismatching sizes, this can result\nin an unintended out-of-bounds access.\n\nTo fix this issue, we need to extend bpf_map_owner with an array of\nstorage_cookie[] to match on i) the exact maps from the original\nprogram if the second program was using bpf_get_local_storage(), or\nii) allow the tail call combination if the second program was not\nusing any of the cgroup local storage maps.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:siemens:simatic_cn_4100_firmware:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.1
  },
  "repos": [
    {
      "repo": "abraxas/CVE-2025-38502-Linux-LPE",
      "url": "https://github.com/abraxas/CVE-2025-38502-Linux-LPE",
      "created_at": "2026-09-11T18:56:40Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 2,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-07-04T21:33:07Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 7d9c3427894fe70d1347b4820476bf37736d2ff0, \u003c c1c74584b9b4043c52e41fec415226e582d266a3",
          "\u003e= 7d9c3427894fe70d1347b4820476bf37736d2ff0, \u003c 66da7cee78590259b400e51a70622ccd41da7bb2",
          "\u003e= 7d9c3427894fe70d1347b4820476bf37736d2ff0, \u003c 7acfa07c585e3d7a64654d38f0a5c762877d0b9b",
          "\u003e= 7d9c3427894fe70d1347b4820476bf37736d2ff0, \u003c 41688d1fc5d163a6c2c0e95c0419e2cb31a44648",
          "\u003e= 7d9c3427894fe70d1347b4820476bf37736d2ff0, \u003c 19341d5c59e8c7e8528e40f8663e99d67810473c",
          "\u003e= 7d9c3427894fe70d1347b4820476bf37736d2ff0, \u003c abad3d0bad72a52137e0c350c59542d75ae4f513"
        ],
        "fixed_in": [
          "c1c74584b9b4043c52e41fec415226e582d266a3",
          "66da7cee78590259b400e51a70622ccd41da7bb2",
          "7acfa07c585e3d7a64654d38f0a5c762877d0b9b",
          "41688d1fc5d163a6c2c0e95c0419e2cb31a44648",
          "19341d5c59e8c7e8528e40f8663e99d67810473c",
          "abad3d0bad72a52137e0c350c59542d75ae4f513"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.9"
        ],
        "fixed_in": [
          "0",
          "5.15.192",
          "6.1.151",
          "6.6.105",
          "6.12.46",
          "6.16.1",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to c1c74584b9b4043c52e41fec415226e582d266a3 or 66da7cee78590259b400e51a70622ccd41da7bb2 or 7acfa07c585e3d7a64654d38f0a5c762877d0b9b or 41688d1fc5d163a6c2c0e95c0419e2cb31a44648 or 19341d5c59e8c7e8528e40f8663e99d67810473c or abad3d0bad72a52137e0c350c59542d75ae4f513 or later.",
      "Upgrade Linux to 0 or 5.15.192 or 6.1.151 or 6.6.105 or 6.12.46 or 6.16.1 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
