No propagation of type

Abierto
#4,582 7 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Reproduce the issue in Binary Ninja using Kernelbase.dll and PsspValidateWin32WalkMarker, then inspect how manually assigned argument types are handled across assignments and dereferences. The fix is complete when setting arg1 to struct OBJECT_ATTRIBUTES** causes the referenced variable to display the propagated OBJECT_ATTRIBUTES* type instead of the original cast type.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Component: Core Core: Type Propagation Effort: Medium Impact: Low

Version and Platform (required):

  • Binary Ninja Version: 3.5.4480-dev, 60681746
  • OS: windows
  • OS Version: 11
  • CPU Architecture: x86_64

Bug Description:
When setting a variable (var1) or argument to a different or custom type and another variable (var2) references it (e.g. var1 = var2, or var1 = *var2), the type information we set on var1 does not propagate to var2.

Steps To Reproduce:
Open anything (e.g. Kernelbase.dll), find a function (e.g. PsspValidateWin32WalkMarker) and set arg1 to a double pointer (e.g. struct OBJECT_ATTRIBUTES** arg1)

Now view anything that does something like
int32_t rbx_1 = *arg1

Note that in this case above, rbx_1 maintained its old/original type, making this assignment a cast, when I'd want it to propagate the type I specifically set for arg1.

I don't see an option for this either? Which makes finding cross-refs for certain types difficult, as you not only have to change the type in an argument, but all variables that copy its value.

Expected Behavior:
I should expect to see something like:
OBJECT_ATTRIBUTES* rbx_1 = *arg1

Screenshots:
image

Additional Information:

Lenguaje dominante
C++
Estrellas
1.3k
Forks
298
Merge medio
5 d 5 h
PR fusionados (30 d)
19

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Vector35/binaryninja-api

Todos los issues de Vector35/binaryninja-api

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.