CVE-2025-37822: riscv: uprobes: Add missing fence.i after building the XOL buffer
In the Linux kernel, the following vulnerability has been resolved:
riscv: uprobes: Add missing fence.i after building the XOL buffer
The XOL (execute out-of-line) buffer is used to single-step the replaced instruction(s) for uprobes. The RISC-V port was missing a proper fence.i (i$ flushing) after constructing the XOL buffer, which can result in incorrect execution of stale/broken instructions.
This was found running the BPF selftests "testprogs: uprobeautoattach, attachprobe" on the Spacemit K1/X60, where the uprobes tests randomly blew up.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.121.1-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-37822?
CVE-2025-37822 has a medium severity rating due to the potential risk associated with improper handling of the XOL buffer in the Linux kernel.
How do I fix CVE-2025-37822?
To fix CVE-2025-37822, update your Linux kernel to the latest stable version that addresses the missing fence.i for uprobes.
What systems are affected by CVE-2025-37822?
CVE-2025-37822 affects the Linux kernel, specifically the RISC-V port implementation.
What could happen if CVE-2025-37822 is exploited?
Exploitation of CVE-2025-37822 could potentially lead to execution of unauthorized instructions or disruption of processes using uprobes.
When was CVE-2025-37822 disclosed?
CVE-2025-37822 was disclosed following updates to the Linux kernel to address related vulnerabilities.