{
  "id": "CVE-2025-37893",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-37893",
  "published_at": "2025-04-18T07:01:28.856Z",
  "title": "LoongArch: BPF: Fix off-by-one error in build_prologue()",
  "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\nLoongArch: BPF: Fix off-by-one error in build_prologue()\n\nVincent reported that running BPF progs with tailcalls on LoongArch\ncauses kernel hard lockup. Debugging the issues shows that the JITed\nimage missing a jirl instruction at the end of the epilogue.\n\nThere are two passes in JIT compiling, the first pass set the flags and\nthe second pass generates JIT code based on those flags. With BPF progs\nmixing bpf2bpf and tailcalls, build_prologue() generates N insns in the\nfirst pass and then generates N+1 insns in the second pass. This makes\nepilogue_offset off by one and we will jump to some unexpected insn and\ncause lockup. Fix this by inserting a nop insn.",
  "cwe": "CWE-193",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 5.5,
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 5dc615520c4dfb358245680f1904bad61116648e, \u003c b3ffad2f02db4aace6799fe0049508b8925eae45",
          "\u003e= 5dc615520c4dfb358245680f1904bad61116648e, \u003c 205a2182c51ffebaef54d643e3745e720cded08b",
          "\u003e= 5dc615520c4dfb358245680f1904bad61116648e, \u003c c74d95a5679741ef428974ab788f5b0758dc78ae",
          "\u003e= 5dc615520c4dfb358245680f1904bad61116648e, \u003c 48b904de2408af5f936f0e03f48dfcddeab58aa0",
          "\u003e= 5dc615520c4dfb358245680f1904bad61116648e, \u003c 7e2586991e36663c9bc48c828b83eab180ad30a9"
        ],
        "fixed_in": [
          "b3ffad2f02db4aace6799fe0049508b8925eae45",
          "205a2182c51ffebaef54d643e3745e720cded08b",
          "c74d95a5679741ef428974ab788f5b0758dc78ae",
          "48b904de2408af5f936f0e03f48dfcddeab58aa0",
          "7e2586991e36663c9bc48c828b83eab180ad30a9"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.1"
        ],
        "fixed_in": [
          "0",
          "6.6.87",
          "6.12.23",
          "6.13.11",
          "6.14.2",
          "6.15"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to b3ffad2f02db4aace6799fe0049508b8925eae45 or 205a2182c51ffebaef54d643e3745e720cded08b or c74d95a5679741ef428974ab788f5b0758dc78ae or 48b904de2408af5f936f0e03f48dfcddeab58aa0 or 7e2586991e36663c9bc48c828b83eab180ad30a9 or later.",
      "Upgrade Linux to 0 or 6.6.87 or 6.12.23 or 6.13.11 or 6.14.2 or 6.15 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
