Skip to content

bug: BinaryNinja generate decompilation output and invalid hallucinated syntax #8212

@HackingRepo

Description

@HackingRepo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions