Type libraries for non-x86 are weirdly wrong and incomplete

Đang mở
#4,347 0 bình luận 7 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, python
Lĩnh vực
reverse-engineering

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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*)'>
Ngôn ngữ chính
C++
Star
1.3k
Fork
298
Merge trung bình
5 ngày 5 giờ
Pull request đã merge (30 ngày)
19

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Vector35/binaryninja-api

Tất cả issue của Vector35/binaryninja-api

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.