Stack analysis fails in delphi prologue
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
調査の方向性
Reproduce the failure with the dogbolt corpus binary at 0x004180f4, then compare it with the existing support in commit 1f93de3128bc086aedc4c7f5580ab98632fef568. Read wf_delphi_intro.py to understand the attempted handling of the Delphi prologue and verify the behavior on the other occurrences described in the issue. Done means stack recovery works for this pattern without breaking similar prologues.
索引モデルが issue の本文から書いたものです。
説明
Version and Platform (required):
- Binary Ninja Version: 6.0.10489-dev
- Edition: Ultimate
- OS: macOS
- OS Version: 26.6
- CPU Architecture: arm64
Bug Description:
One of the common types of Delphi function prologue uses a loop to allocate a fixed amount of stack space, causing LLIL's stack recovery to break.
Steps To Reproduce:
- Open binary, dogbolt corpus sha256 60bdc2d5e9728214d5c5cf43e9abb62d62c0afbeecdc737a7f482e09b5c773e1
- Navigate to 0x004180f4
- Observe broken stack recovery
Expected Behavior:
I expected stack recovery to work
Screenshots/Video Recording:
Binary:
See dogbolt corpus 60bdc2d5e9728214d5c5cf43e9abb62d62c0afbeecdc737a7f482e09b5c773e1 or on internal slack under caesar_cipher.exe
Additional Information:
On public slack Michael F reported the same issue with a different (unknown) binary. The binary in this issue is compiled with Delphi ~2010 and uses this pattern in a number of places to set up a stack frame, and seems like it has the identical prologue and behavior.
We already have support for patterns nearly identical to this one, see Vector35/binaryninja@1f93de3128bc086aedc4c7f5580ab98632fef568, but due to this using x86's dec ecx causing a spill to a temporary register during the loop, this specific pattern is not handled.
I had Codex generate a workflow plugin that attempts to handle this case, which seems to work for exactly this function but unconfirmed in the general case. That is available here: wf_delphi_intro.py
- 主要言語
- C++
- スター
- 1.3k
- フォーク
- 297
- 平均マージ
- 5日 8時間
- マージ済み PR(30日)
- 16
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Vector35/binaryninja-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Vector35/binaryninja-api#8621 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
ARMv7 lifting issuesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Vector35/binaryninja-api#8617 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Vector35/binaryninja-api#8589 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8540 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8446 ·
メンテナーはふだん 4 日以内に返信
Vector35/binaryninja-api の issue をすべて見る
似ている issue
-
upstream update
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conan-io/conan-center-index#31098 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bug chart-audit
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
godotengine/godot#124120 ·
メンテナーはふだん 1 日以内に返信
-
Component: R Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/arrow#51695 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信