Vector35 / Vector35/binaryninja-api

bug: BinaryNinja generate decompilation output and invalid hallucinated syntax

Aperta
#8,212 3 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: Stable
  • Edition: Free
  • Ubuntu Linux
  • OS Version: 26.04
  • CPU Architecture: x64

Hi, Vector35

i see by using that piece of code

use std::hint::black_box;

#[inline(never)]
#[export_name = "a@LDV"]
fn a(a: &str, s: i32) -> i32 {
   println!("{}", a);

   s
}

fn main() {
   let ret = std::hint::black_box(a("hi", 4097));
   println!("{:?}", ret)
}

binary ninja, generates completly invalid code

00414600    int64_t* sample::main::h69490dc93cd0c9be()

00414615        a(
00414615            "
00414615        "hi/rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/std/src/sys/pal/unix/stack_overflow."
00414615        "rs", 
00414615            2, 0x1001)
0041461a        int32_t var_14 = 0x1001
00414627        int32_t* var_10 = &var_14
00414633        int64_t (* var_8)(int64_t arg1, void* arg2) =
00414633            core::fmt::num::_$LT$imp...r$u20$i32$GT$::fmt::he9357ebfcf107f8a
0041464e        return std::io::stdio::_print::hdebbaafb78bfc2d5()

first the " unclosed, and second "rs" and "hi/rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/std/src/sys/pal/unix/stack_overflow.", is just trailling garbage

there a no 2 in my binary, where is coming just hallucination i see? and hi mixed with the string generated by rustc /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/std/src/sys/pal/unix/stack_overflow., wgich become confusing reverse engineering and by an attacker can do that trick it can hide their code via that confusing code

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

Compile the supplied Rust sample and open the resulting binary in Binary Ninja, then compare the generated decompilation with the binary's actual strings and call arguments. Trace how the decompiler represents the affected Rust data and determine whether the output can preserve string boundaries and avoid unsupported or spurious syntax.

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

Valutazione

Stack tecnologico
rust
Ambito
compilers, reverse-engineering
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.