Vector35 / Vector35/binaryninja-api

tailcall analysis passes return_addr as first arg

Aperta
#3,832 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Component: Core Effort: Low Impact: Low
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.2.3814
  • OS: Windows 10
  • OS Version: 22H2
  • CPU Architecture x64

Bug Description:
When analysing functions with tailcalls the HLIL adds the return address as first arg (makes sense, as it's the top of the stack, but is wrong). I've seen it with 0 args, but also when there are multiple args it will look like this

func1(void* arg1, void* arg2, void* arg3)
do_things
other_things
func2(return_addr, arg1, arg2)

even when the underlying ASM doesn't touch the stack frame

Steps To Reproduce:
I can find some more detailed ones if you like

Expected Behavior:
Tailcalls should not pass return_addr as arg1

Screenshots:

image (1)
image

Additional Information:

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 reported x64 tailcall case in HLIL and compare the generated call arguments with the underlying assembly. The issue does not name source files or tests, so locate the tailcall analysis entry point and any related tests first. Done means tailcalls no longer include the return address as the first argument.

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.