{
  "id": "CVE-2025-22087",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-22087",
  "published_at": "2025-04-16T14:12:35.359Z",
  "title": "bpf: Fix array bounds error with may_goto",
  "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": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix array bounds error with may_goto\n\nmay_goto uses an additional 8 bytes on the stack, which causes the\ninterpreters[] array to go out of bounds when calculating index by\nstack_size.\n\n1. If a BPF program is rewritten, re-evaluate the stack size. For non-JIT\ncases, reject loading directly.\n\n2. For non-JIT cases, calculating interpreters[idx] may still cause\nout-of-bounds array access, and just warn about it.\n\n3. For jit_requested cases, the execution of bpf_func also needs to be\nwarned. So move the definition of function __bpf_prog_ret0_warn out of\nthe macro definition CONFIG_BPF_JIT_ALWAYS_ON.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 011832b97b311bb9e3c27945bc0d1089a14209c9, \u003c 19e6817f84000d0b06f09fd69ebd56217842c122",
          "\u003e= 011832b97b311bb9e3c27945bc0d1089a14209c9, \u003c 4524b7febdd55fb99ae2e1f48db64019fa69e643",
          "\u003e= 011832b97b311bb9e3c27945bc0d1089a14209c9, \u003c 1a86ae57b2600e5749f5f674e9d4296ac00c69a8",
          "\u003e= 011832b97b311bb9e3c27945bc0d1089a14209c9, \u003c 6ebc5030e0c5a698f1dd9a6684cddf6ccaed64a0"
        ],
        "fixed_in": [
          "19e6817f84000d0b06f09fd69ebd56217842c122",
          "4524b7febdd55fb99ae2e1f48db64019fa69e643",
          "1a86ae57b2600e5749f5f674e9d4296ac00c69a8",
          "6ebc5030e0c5a698f1dd9a6684cddf6ccaed64a0"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.9"
        ],
        "fixed_in": [
          "0",
          "6.12.23",
          "6.13.11",
          "6.14.2",
          "6.15"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 19e6817f84000d0b06f09fd69ebd56217842c122 or 4524b7febdd55fb99ae2e1f48db64019fa69e643 or 1a86ae57b2600e5749f5f674e9d4296ac00c69a8 or 6ebc5030e0c5a698f1dd9a6684cddf6ccaed64a0 or later.",
      "Upgrade Linux to 0 or 6.12.23 or 6.13.11 or 6.14.2 or 6.15 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
