Vector35 / Vector35/binaryninja-api
Type propagation through DataVariables/got entries
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: 3.6.4790-dev, 10b89271
- OS: macos
- OS Version: 14.3
- CPU Architecture: arm64
Bug Description:
I did not deep dive into the clang internals of handling of the classes but looks like it decides to handle public member functions as exported function. BN creates export and import entries for member functions but it fails when propagating the function type from exported one to imported one.
In the example below Animal::eat, Animal::sleep and Dog::bark should have at least one parameter which is class itself but all of them are missing that.
When I check those functions (not the import entries) they are defined like:
int64_t `Dog::bark`()
int64_t `Animal::eat`(void* arg1)
int64_t `Animal::sleep`(void* arg1)
So BN detected eat and sleep have at least one parameter (it did because those functions references arg1) but it did missed the bark.
When I check got section this is what I got:
So the right side functions (at least eat and sleep) have a parameter for class itself but this does not reflected to the left side which is import entry I guess. Left side functions looks like this:
I expect BN to propagate those types correctly.
Steps To Reproduce:
Binary is attached, just open it in BN.
Additional Information:
classtest.zip
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Open the attached classtest.zip in Binary Ninja and inspect the DataVariables and got entries for Animal::eat, Animal::sleep, and Dog::bark. Compare the imported and exported function types, focusing on propagation of the class parameter. Done means the import entries reflect the parameters detected on the corresponding functions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- 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
- 35/100