What’s Vulnerable › Vulnerabilities
CVE-2024-43843: riscv, bpf: Fix out-of-bounds issue when preparing trampoline image
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-08-17 · updated 2026-06-17
- Weakness: CWE-131
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 products
- Linux kernel: from 6.8 before 6.10.3 — fixed in 6.10.3
How to fix
Upgrade to a fixed version: Linux kernel 6.10.3. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/3e6a1b1b179abb643ec3560c02bc3082bc92285f
- https://git.kernel.org/stable/c/9f1e16fb1fc9826001c69e0551d51fbbcd2d74e9
Get alerted when CVE-2024-43843 or the next vulnerability affects your stack