0xMiden / 0xMiden/miden-vm

`u32` operations' inputs are not range checked

未关闭
#2,062 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
air processor
主要语言
Rust
星标
772
派生
352
平均合并
1 天 7 小时
30 天内合并 PR
84

描述

~~`Process` [doesn't add range checks](https://github.com/0xMiden/miden-vm/blob/a2d1a0a85ffbf13da70641210a1518fb1597c65f/processor/src/operations/u32_ops.rs#L182-L204) to the `U32and` and `U32xor` operations. I'm not sure if there's a historical reason why this wasn't done, but from what I can tell, this is a bug.~~

`U32and` and `U32xor` are consistent with other u32 operations in that they don't range check their inputs (but guarantee that their output is a `u32` *if* their input is a u32). We should revisit this design choice for all `u32` operations.

贡献指南

打开贡献指南

调研方向

The issue is about u32 operations in processor/src/operations/u32_ops.rs, specifically U32and and U32xor. First, examine the file to understand the current implementation and how other u32 operations handle range checking. Then, review the design choice for all u32 operations, considering the guarantee that output is a u32 only if input is a u32. Done looks like proposing or implementing consistent range checking across all relevant operations.

由索引模型根据 Issue 内容生成。

评估

技术栈
rust
领域
compilers, security
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。