Stack analysis fails in delphi prologue
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- reverse-engineering
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 298
- Merge medio
- 4g 8h
- PR unite (30g)
- 21
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Vector35/binaryninja-api
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8540 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8446 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8444 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Vector35/binaryninja-api#8441 · 3 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Vector35/binaryninja-api#8404 ·
Tutte le issue di Vector35/binaryninja-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ros2/message_filters#338 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
subsurface/subsurface#4984 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·