Finding constants in disassembly often doesn't find any

Aperta
#8,695 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start by tracing BinaryView::FindAllConstant and how it matches disassembly tokens against their values; compare that behavior with InstructionTextToken sizes for the listed architectures. The issue does not name source files or tests, so locate the implementation and relevant coverage before choosing a fix. Done means numeric constants visible in disassembly can be found for the reproduction architectures.

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

Descrizione

Effort: Low Impact: Medium

Version and Platform (required):

  • Binary Ninja Version: 6.1.11009-dev Ultimate, d194d34
  • OS: macOS 27.0.1
  • CPU Architecture: arm64

Bug Description:
BinaryView::FindAllConstant can only find constants whose tokens report have a non-zero size. Many architectures don't populate the size for immediates within GetInstructionText.

Steps To Reproduce:

  1. Open an aarch64, armv7, thumb2, or MIPS binary.
  2. Switch to disassembly.
  3. Use the Find dialog with "Constant (Disassembly)" mode to search for a numeric constant that is visible within a function body.

Expected Behavior:
The constant that is clearly visible in the disassembly will be found.

Additional Information:
I'm not clear if the bug here is that BinaryView::FindAllConstant requires a token to have a non-zero size in order to match its value, or if the bug is that architectures aren't populating the size field for these tokens.

I can't find any documentation that indicates it is required for architectures to populate it, and the shape of the InstructionTextToken API in C++ has no way to require it for specific token types. That makes me lean towards BinaryView::FindAllConstant being at fault.

Lingua principale
C++
Stelle
1.3k
Fork
304
Merge medio
2g 20h
PR unite (30g)
10

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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.

Altre issue di Vector35/binaryninja-api

Tutte le issue di Vector35/binaryninja-api

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.