Stack analysis fails in delphi prologue
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Área
- reverse-engineering
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 1.3k
- Forks
- 297
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 14
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Vector35/binaryninja-api
-
Hexagon lifting issuesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Vector35/binaryninja-api#8621 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
ARMv7 lifting issuesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Vector35/binaryninja-api#8617 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Vector35/binaryninja-api#8589 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Vector35/binaryninja-api#8540 ·
Los mantenedores suelen responder en 2 días
-
normalize time logs from WARPAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Vector35/binaryninja-api#8446 ·
Los mantenedores suelen responder en 2 días
Todos los issues de Vector35/binaryninja-api
Issues similares
-
area/ysql kind/bug priority/medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
yugabyte/yugabyte-db#34552 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
ai_p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ClickHouse/ClickHouse#123351 ·
Los mantenedores suelen responder en 1 día