risc0-zkvm is vulnerable to Undefined Behavior
18
CVE Score
Low
Undefined Behavior
The vulnerability lies in the sys_read syscall implementation in the v2 kernel of ZKVM. When handling reads larger than 1024 bytes, the kernel splits the read into smaller chunks. However, it fails to properly update the nwords argument (stored in register a4) during this chunking. As a result, the syscall may read beyond the end of the supplied buffer or not read enough data, leading to undefined or unsafe behavior. The fix ensures that the nwords argument (a4) is correctly updated during large read operations. This prevents incorrect read sizes and avoids reading past buffer boundaries. The patch also enhances test coverage to include reads larger than 1024 bytes, which helps detect this issue during testing.
Upgrade the risc0-zkvm library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
1.2.0 - 2.0.1
Fixed in 2.0.2risc0-zkvm is vulnerable to Undefined Behavior in versions 1.2.0 - 2.0.1.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.