CVE-2025-37893

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

29 Apr 2025, 16:54

Type Values Removed Values Added
CWE CWE-193
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
First Time Linux linux Kernel
Linux
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
References () https://git.kernel.org/stable/c/205a2182c51ffebaef54d643e3745e720cded08b - () https://git.kernel.org/stable/c/205a2182c51ffebaef54d643e3745e720cded08b - Patch
References () https://git.kernel.org/stable/c/48b904de2408af5f936f0e03f48dfcddeab58aa0 - () https://git.kernel.org/stable/c/48b904de2408af5f936f0e03f48dfcddeab58aa0 - Patch
References () https://git.kernel.org/stable/c/7e2586991e36663c9bc48c828b83eab180ad30a9 - () https://git.kernel.org/stable/c/7e2586991e36663c9bc48c828b83eab180ad30a9 - Patch
References () https://git.kernel.org/stable/c/b3ffad2f02db4aace6799fe0049508b8925eae45 - () https://git.kernel.org/stable/c/b3ffad2f02db4aace6799fe0049508b8925eae45 - Patch
References () https://git.kernel.org/stable/c/c74d95a5679741ef428974ab788f5b0758dc78ae - () https://git.kernel.org/stable/c/c74d95a5679741ef428974ab788f5b0758dc78ae - Patch

25 Apr 2025, 11:15

Type Values Removed Values Added
References
  • {'url': 'https://git.kernel.org/stable/c/e9ccb262b39ab01a5ac2e485b7996b8498e7b373', 'source': '416baaa9-dc9f-4396-8d5f-8c081fb06d67'}
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: LoongArch: BPF: Corrección de error de uno en build_prologue() Vincent informó que ejecutar programas BPF con llamadas de cola en LoongArch provoca un bloqueo duro del kernel. La depuración de los problemas muestra que a la imagen JIT le falta una instrucción jirl al final del epílogo. Hay dos pasos en la compilación JIT, el primer paso establece los indicadores y el segundo paso genera código JIT basado en esos indicadores. Con programas BPF que mezclan bpf2bpf y llamadas de cola, build_prologue() genera N insns en el primer paso y luego genera N + 1 insns en el segundo paso. Esto hace que epilogue_offset se desvíe en uno y saltaremos a algún insn inesperado y causaremos un bloqueo. Arregle esto insertando un insn nop.

18 Apr 2025, 07:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-18 07:15

Updated : 2025-04-29 16:54


NVD link : CVE-2025-37893

Mitre link : CVE-2025-37893

CVE.ORG link : CVE-2025-37893


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-193

Off-by-one Error