MachoView should define imported symbols even if they are not presented in SYMTAB

Abierto
#7,196 3 comentarios 0 reacciones 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
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Start in view/macho/machoview.cpp around line 3121, then inspect how DYLD_INFO binding strings are handled alongside the symtab loop. Open the attached binary, navigate to 0x100004000, and verify that the imported symbol referenced by binding is defined even when symtab.nsyms is zero, so relocation analysis no longer leaves a null external symbol.

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

Descripción

Component: BinaryViewType Effort: Low File Format: Mach-O Impact: Medium

Version and Platform (required):

  • Binary Ninja Version: 5.2.8012-dev Personal (aec518eb)

Bug Description:
Current implementation of MachoView relies on symtab when defining the symbols in the macho. However it is possible to bind imported (external) symbols even if they are not in the symtab, as binding from DYLD_INFO uses their own inlined strings. So for the cases when symbol is used in the binding, but not listed in the symtab, leads to the error with applying relocation during macho analysis.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Open attached binary
  2. Go to 0x100004000
  3. There is null instead of external symbol

Expected Behavior:
I think MachoView should define symbols when they referenced in the dyld binding as well.

Screenshots/Video Recording:

Image Image

Binary:
bin.zip

Additional Information:
Definition of the imported macho symbol is nested in the loop over symtab, so if there is no symbols (symtab.nsyms == 0) then no symbols will be defined, it's incorrect.

https://github.com/Vector35/binaryninja-api/blob/2f1d09c6b714a9f2664eab0a9dbef79e3cbd8919/view/macho/machoview.cpp#L3121

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.