No propagation of type

Aperta
#4,582 7 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Reproduce the issue in Binary Ninja using Kernelbase.dll and PsspValidateWin32WalkMarker, then inspect how manually assigned argument types are handled across assignments and dereferences. The fix is complete when setting arg1 to struct OBJECT_ATTRIBUTES** causes the referenced variable to display the propagated OBJECT_ATTRIBUTES* type instead of the original cast type.

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

Descrizione

Component: Core Core: Type Propagation Effort: Medium Impact: Low

Version and Platform (required):

  • Binary Ninja Version: 3.5.4480-dev, 60681746
  • OS: windows
  • OS Version: 11
  • CPU Architecture: x86_64

Bug Description:
When setting a variable (var1) or argument to a different or custom type and another variable (var2) references it (e.g. var1 = var2, or var1 = *var2), the type information we set on var1 does not propagate to var2.

Steps To Reproduce:
Open anything (e.g. Kernelbase.dll), find a function (e.g. PsspValidateWin32WalkMarker) and set arg1 to a double pointer (e.g. struct OBJECT_ATTRIBUTES** arg1)

Now view anything that does something like
int32_t rbx_1 = *arg1

Note that in this case above, rbx_1 maintained its old/original type, making this assignment a cast, when I'd want it to propagate the type I specifically set for arg1.

I don't see an option for this either? Which makes finding cross-refs for certain types difficult, as you not only have to change the type in an argument, but all variables that copy its value.

Expected Behavior:
I should expect to see something like:
OBJECT_ATTRIBUTES* rbx_1 = *arg1

Screenshots:
image

Additional Information:

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

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.

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.