Incorrect stack adjustment calculated for function
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à
- Ferma
- Stack tecnologico
- cpp
- Ambito
- compilers, reverse-engineering
Direzione di ricerca
Reproduce the issue with Archive.zip at Dog::Dog (0x00401ee0), then inspect StackAdjustmentResolver and the MLIL translator, comparing the resolver estimate with the translated stack offset. Check the LLIL frame offset and the call site in _main (0x0040626a). Done means the function reports a stack adjustment of 4 and callers no longer have mismatched stack pointers.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version and Platform (required):
- Binary Ninja Version: 5.2.8614
- Edition: Ultimate
- OS: macOS
- OS Version: 15.5
- CPU Architecture: M1
Bug Description:
The stack adjustment on this function should be trivial to calculate but is being resolved with an incorrect value.
Stack offset of 8 on exit, subtract 4 for the return address, so it should be 4. But it is calculated as 0, confidence 255, and all callers of this function have mismatched stack pointers.
Steps To Reproduce:
- Open this binary: Archive.zip
- Navigate to
Dog::Dog(0x00401ee0) - Python:
>>> current_function.stack_adjustment
OffsetWithConfidence(value=0, confidence=255)
- Observe stack frame offset in LLIL and see that it really shouldn't be 0
- Observe call site at
_main(0x0040626a) and see that the stack misaligns right after the branches join
Expected Behavior:
I expected the stack offsets to resolve properly
Additional Information:
Seems like this is MLIL's doing? Quick step through in the debugger shows that StackAdjustmentResolver gets 4 as its estimate, but MLIL translator ignores that and goes with 0 instead.
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 298
- Merge medio
- 5g 5h
- PR unite (30g)
- 19
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à 2/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8516 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Vector35/binaryninja-api#8503 ·
-
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 ·
Tutte le issue di Vector35/binaryninja-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gazebosim/gz-sensors#662 · 1 commento ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
comp-datalake
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
LadybirdBrowser/ladybird#12123 ·