CVE-2025-37893
kernel: LoongArch: BPF: Fix off-by-one error in build_prologue()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 18, 2025
Updated · October 30, 2026
Description
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.
Statement
This vulnerability is rated as Moderate because exploitation requires local access and privileges to load and execute specialized extended Berkeley Packet Filter (eBPF) programs, leading exclusively to a denial of service via a system lockup without compromising data confidentiality or integrity. Red Hat products are not affected by this flaw as the LoongArch CPU architecture is not supported or built in Red Hat Enterprise Linux kernels.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-193 · Off-by-one Error