7.8high
riscv, bpf: Fix out-of-bounds issue when preparing trampoline image
- Severity
- 7.8high CVSS:3.1 by NVD
- Exploit likelihood
- 0.31% (higher than 16% of CVEs)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: riscv, bpf: Fix out-of-bounds issue when preparing trampoline image We get the size of the trampoline image during the dry run phase and allocate memory based on that size. The allocated image will then be populated with instructions during the real patch phase. But after commit 26ef208c209a ("bpf: Use arch_bpf_trampoline_size"), the `im` argument is inconsistent in the dry run and real patch phase. This may cause emit_imm in RV64 to generate a different number of instructions when generating the 'im' address, potentially causing out-of-bounds issues. Let's emit the maximum number of instructions for the "im" address during dry run to fix this problem.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 26ef208c209a0e6eed8942a5d191b39dccfa6e38 before 3e6a1b1b179abb643ec3560c02bc3082bc92285f, from 26ef208c209a0e6eed8942a5d191b39dccfa6e38 before 9f1e16fb1fc9826001c69e0551d51fbbcd2d74e9, 6.8 Not affected: before 6.8, from 6.10.3 up to 6.10.*, from 6.11 up to * | CVE List |
| linux linux_kernel | from 6.8 before 6.10.3 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: riscv, bpf: Fix out-of-bounds issue when preparing trampoline image We get the size of the trampoline image during the dry run phase and allocate memory based on that size. The allocated image will then be populated with instructions during the real patch phase. But after commit 26ef208c209a ("bpf: Use arch_bpf_trampoline_size"), the `im` argument is inconsistent in the dry run and real patch phase. This may cause emit_imm in RV64 to generate a different number of instructions when generating the 'im' address, potentially causing out-of-bounds issues. Let's emit the maximum number of instructions for the "im" address during dry run to fix this problem.
NVD (es)
En el kernel de Linux, se resolvió la siguiente vulnerabilidad: riscv, bpf: soluciona el problema de fuera de los límites al preparar la imagen del trampolín. Obtenemos el tamaño de la imagen del trampolín durante la fase de ejecución en seco y asignamos memoria en función de ese tamaño. La imagen asignada se completará con instrucciones durante la fase de parche real. Pero después del commit 26ef208c209a ("bpf: Use arch_bpf_trampoline_size"), el argumento `im` es inconsistente en la fase de prueba y de parche real. Esto puede hacer que emit_imm en RV64 genere una cantidad diferente de instrucciones al generar la dirección 'im', lo que podría causar problemas fuera de los límites. Emitamos la cantidad máxima de instrucciones para la dirección "im" durante el ensayo para solucionar este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-43843 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-43843 changed 2026-06-17 | Public domain |