Vector35 / Vector35/binaryninja-api

Binary ninja fails to find Global Pointer (gp) whereas Ghidra doesn't [RISCV 32]

Aperta
#7,485 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C++
Stelle
1.3k
Fork
298
Merge medio
5g 5h
PR unite (30g)
19

Descrizione

Version and Platform (required):

  • Binary Ninja Version: 5.1.8104
  • Edition: Non-Commercial
  • OS: NixOs
  • OS Version: 25.11
  • CPU Architecture: x64

Bug Description:
When opening the attached file for analysis BN fails to find the global pointer which leads to a worse decomp of the main/entry function.
When opening the same binary in Ghidra for de compilation it successfully finds the GPs value.

The binary itself is a small sample meant for decompilation and given in the context of a university course, it consist of a main function and a function that generates Fibonacci numbers the main function fills an array, compares it to some pre computed numbers and exists successfully if they match and with -1 otherwise
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Open elf file
  2. run analysis
  3. GP value couldn't be determined

Expected/Desired Behavior:
GP should be found, Ghidra found it so it's safe to assume it's possible.

Screenshots/Video Recording:

Binary:
If applicable, please provide us with the binary to help us work with the issue faster. Here are a few options:
Binary phrase below:
special octant heals watchfully

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start by reproducing the issue with the RISC-V 32 ELF described in the report and confirm the global-pointer analysis failure during ELF analysis. The issue names no source file, test, or entry point beyond the main/entry function, and the supplied binary is not available in the payload. Done means the global pointer is identified and the resulting decompilation improves without regressing other analysis.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
reverse-engineering
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.