Skip to content

Ghidra import seems to (incorrectly) always import pointer as 64-bit #7833

@ArcaneNibble

Description

@ArcaneNibble

Version and Platform (required):

  • Binary Ninja Version: 5.2.8722 Personal (c75356aa)
  • OS: macOS
  • CPU Architecture: ARM64

Bug Description:
I attempted to import a Ghidra database for a Windows 32-bit x86 PE EXE, and Ghidra pointer objects appear to have been imported as __ptr64 even though the target architecture is 32 bits. This, understandably, corrupts the data afterwards as well as confusing the decompiler.

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

  1. Load a 32-bit x86 PE into Ghidra. Mark up some data as pointer (possibly by using Ghidra's P hotkey)
  2. Load the same 32-bit PE into Binary Ninja. Wait for initial analysis to finish.
  3. Select Plugins->Ghidra Import->Import Database...
  4. Very likely not necessary, but I happen to have deselected Memory Map
  5. Notice that the pointer data is now a 64-bit pointer.

Expected Behavior:
pointer objects are 32 bits on a 32-bit target.

Screenshots/Video Recording:
Image

Image

Binary:
I don't have permission to share this binary (abandonware). I can upload it if really necessary, but I don't think it matters?

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions