-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Executor: bail for very large cycle counts (#886)
Some instructions within the zkVM have variable cycle counts that are configured by the guest code. A malicious host can alter parameters to ecalls such as SHA so that a single instruction to this ecall can exceed the segment cycle limit. If a single instruction takes more cycles than a single segment, there is no way to split the instruction among multiple segments. Return an error for this case to avoid infinite splits.
- Loading branch information
Showing
5 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ pub enum MultiTestSpec { | |
Oom, | ||
OutOfBounds, | ||
RsaCompat, | ||
TooManySha, | ||
} | ||
|
||
declare_syscall!(pub SYS_MULTI_TEST); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters