Constant propagation misses values that only become known after stack de-aliasing
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
调研方向
Start by opening the reported .bndb and inspecting HLIL at 0x3b698fde alongside MLIL around the partial write at 0x3b76597e. Compare propagation with and without that instruction, then trace the stack de-aliasing and constant-propagation stages involved. Done means the known value of rdi_1 is propagated and the resulting expression is simplified without manually setting the value.
由索引模型根据 Issue 内容生成。
描述
Version and Platform (required):
- Binary Ninja Version: 5.4.9793-dev Ultimate, 12373795
- OS: macOS 26.5.1
- CPU Architecture: arm64
Steps To Reproduce:
- Download
nova guard works curiouslyand open the included .bndb. - Go to
0x3b698fdein HLIL:
40 @ 3b698fde r9.b = *(arg4 + 4 + rdi_1 + 0x6f3b9513)
- Hover over
rdi_1and note that it reports to have a constant value of-0x6f3b9513, yet the constant is not propagated and the resulting expression is not simplified.
Additional Information:
If I explicitly set the value of rdi_1 to -0x6f3b9513 prior to 0x3b698fde then it is propagated and simplified as expected:
35 @ 3b698fde ASSERT(rdi_1, ConstantValue: 0xffffffff90c46aed)
36 @ 3b698fde r9.b = *(arg4 + 4)
It also simplifies other uses of rdi_1 later in the function.
This appears to be a consequence of the value of rdi being most recently modified via a partial field access:
3b76597e and dil, byte [rsp+rdi-0x6f3b9515 {var_8+0x2}]
which ends up in MLIL as:
8 @ 3b76597e rdi.dil = 0x17 & var_8:2.b
If I NOP the instruction at 0x3b76597e, then the value of rdi is constant propagated. It looks like the partial write is not resolved until after the constant propagation has been performed. This means the value of rdi is not known when constant propagation is performed, and so it is left as a variable.
- 主要语言
- C++
- 星标
- 1.3k
- 派生
- 298
- 平均合并
- 5 天 5 小时
- 30 天内合并 PR
- 19
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Vector35/binaryninja-api 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
Vector35/binaryninja-api#8540 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
Vector35/binaryninja-api#8516 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
Vector35/binaryninja-api#8503 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
Vector35/binaryninja-api#8446 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
Vector35/binaryninja-api#8444 ·
查看 Vector35/binaryninja-api 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 92/100
autowarefoundation/autoware_universe#13413 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
automated-analysis bug memory-safety
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
gazebosim/gz-sensors#662 · 1 条评论 ·