ghsa-3xjw-75cj-9fvw
Vulnerability from github
Published
2025-04-18 15:31
Modified
2025-04-29 18:30
Severity ?
Details
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: BPF: Fix off-by-one error in build_prologue()
Vincent reported that running BPF progs with tailcalls on LoongArch causes kernel hard lockup. Debugging the issues shows that the JITed image missing a jirl instruction at the end of the epilogue.
There are two passes in JIT compiling, the first pass set the flags and the second pass generates JIT code based on those flags. With BPF progs mixing bpf2bpf and tailcalls, build_prologue() generates N insns in the first pass and then generates N+1 insns in the second pass. This makes epilogue_offset off by one and we will jump to some unexpected insn and cause lockup. Fix this by inserting a nop insn.
{ "affected": [], "aliases": [ "CVE-2025-37893" ], "database_specific": { "cwe_ids": [ "CWE-193" ], "github_reviewed": false, "github_reviewed_at": null, "nvd_published_at": "2025-04-18T07:15:42Z", "severity": "MODERATE" }, "details": "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.", "id": "GHSA-3xjw-75cj-9fvw", "modified": "2025-04-29T18:30:52Z", "published": "2025-04-18T15:31:37Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-37893" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/205a2182c51ffebaef54d643e3745e720cded08b" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/48b904de2408af5f936f0e03f48dfcddeab58aa0" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/7e2586991e36663c9bc48c828b83eab180ad30a9" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/b3ffad2f02db4aace6799fe0049508b8925eae45" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/c74d95a5679741ef428974ab788f5b0758dc78ae" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/e9ccb262b39ab01a5ac2e485b7996b8498e7b373" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "type": "CVSS_V3" } ] }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.