Intel

AIKIDO-2025-10277

risc0-zkvm is vulnerable to Undefined Behavior

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Apr 30, 2025
April 30, 2025

18

CVE Score

Low

Undefined Behavior

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the risc0-zkvm library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Package

Versions

1.2.0 - 2.0.1

Fixed in 2.0.2

Background info

risc0-zkvm is vulnerable to Undefined Behavior in versions 1.2.0 - 2.0.1.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea