Type libraries for non-x86 are weirdly wrong and incomplete

Abierto
#4,347 0 comentarios 7 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
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp, python

Línea de trabajo

Start by comparing the generated libraries at typelib/armv7/libc.so.6.bntl, typelib/aarch64/libc.so.6.bntl, and typelib/x86/libc.so.6.bntl, using the TypeLibrary Python calls shown in the report. Trace the undocumented builtin type-library generation process and verify that non-x86 libraries include strcpy with the same correct two-argument signature as x86.

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

Descripción

Component: Type Libraries Effort: Medium Impact: Medium

Version and Platform (required):

  • Binary Ninja Version: 3.5.4296-dev
  • OS: Arch Linux
  • CPU Architecture: x64

Bug Description:
strcpy gets an absolutely bonkers type on armv7, and doesn't exist on aarch64. The process by which the builtin type libraries are generated is undocumented, which makes it difficult to discern why this is the case, and what the actual extent of the problem is.

Steps To Reproduce:

In [1]: from binaryninja import *

In [2]: tylib = TypeLibrary.load_from_file('/home/maya/binaryninja/typelib/armv7/libcv
   ...: 7.so.6.bntl')

In [3]: tylib.get_named_object('strcpy')
Out[3]: <type: immutable:FunctionTypeClass 'char*(char* dest, char const* src, char const* src, char* dest)'>

In [4]: tylib = TypeLibrary.load_from_file('/home/maya/binaryninja/typelib/aarch64/lib
   ...: c.so.6.bntl')

In [5]: tylib.get_named_object('strcpy')

In [6]: tylib.get_named_object('strcpy') is None
Out[6]: True

Expected Behavior:
The type is correct, as on x86:

In [7]: tylib = TypeLibrary.load_from_file('/home/maya/binaryninja/typelib/x86/libc.so
   ...: .6.bntl')

In [8]: tylib.get_named_object('strcpy')
Out[8]: <type: immutable:FunctionTypeClass 'char*(char*, char const*)'>
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.