NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Evaluating Disassembly Errors With Only Binaries

Lambang Akbar Wijayadi, Yuancheng Jiang, Roland H. C. Yap, Zhenkai Liang, Zhuohao Liu · DOI

Introduction

Disassembling binary code—the process of translating machine-readable bits back into human-readable assembly instructions—is a foundational task in computer security. From malware analysis to automated patching and Control-Flow Integrity (CFI), security tools rely on the accuracy of disassemblers. However, disassembly is an inherently "undecidable" problem. Because code and data are often interleaved in memory and indirect jumps obscure execution paths, even industry-standard tools like IDA Pro and Ghidra frequently produce errors.

The Challenge of Ground Truth

The traditional method for measuring disassembler accuracy involves comparing output against a "ground truth" derived from the original source code. While effective in a lab setting, this approach fails in real-world scenarios where the source code is unavailable, such as when analyzing malware or auditing proprietary commercial software. This creates a circular dependency: we use disassemblers because we lack source code, yet we cannot verify the disassembler's reliability without that same source code.

TraceBin: A Sound Approach to Disassembly Evaluation

To bridge this gap, we present TraceBin, an evaluation framework that identifies disassembly errors using only the binary itself. TraceBin shifts the focus from "completeness" (finding every possible error) to "soundness" (finding guaranteed errors).

Methodology

TraceBin utilizes Dynamic Binary Instrumentation (DBI) via the DynamoRIO framework to establish a "sound proxy oracle." The process follows three distinct phases:

  1. Dynamic Tracing: The binary is executed under standard workloads (e.g., the SPEC benchmark suite). TraceBin records every unique instruction that actually executes on the CPU. Because these instructions were observed during runtime, they are indisputably part of the valid disassembly.
  2. Static Disassembly: The same binary is processed by popular static analysis tools, including IDA Pro, Ghidra, angr, radare2, and objdump.
  3. Comparison and Explanation: TraceBin compares the dynamic trace against the static output. If an instruction executed by the CPU is missing or incorrectly identified by the static tool, it is flagged as a confirmed error.

To maintain scalability, TraceBin focuses on unique instruction traces rather than exhaustive execution logs, allowing it to analyze complex programs without excessive overhead.

Experimental Evaluation

TraceBin was evaluated against a diverse set of binaries to test its robustness across different languages and compilation environments:

  • Standard Benchmarks: SPEC CPU 2006 and 2017, compiled with GCC and Clang at various optimization levels.
  • Language Diversity: Fortran programs were included to ensure the tool remains language-agnostic.
  • Real-World Software: Closed-source binaries, including the RAR archiver and NVIDIA CUDA utilities.
  • Adversarial Cases: "Trojanized" binaries designed to exploit known weaknesses in disassembly heuristics.

Key Insights

The Impact of Optimization

One of the most significant findings is that aggressive optimization, particularly Link Time Optimization (LTO), drastically increases disassembly errors. These optimizations restructure code in ways that break the common heuristics disassemblers use to identify function boundaries and instruction sequences.

No Universal Leader

The study revealed that no single disassembler is consistently superior. IDA Pro may correctly identify code that Ghidra misses, and vice versa. Even high-end commercial tools exhibited significant gaps when faced with complex control flows.

The "Disassembly Gap" as a Security Risk

The researchers demonstrated that these errors are not merely academic; they represent a tangible security risk. By intentionally crafting code that falls into these "disassembly gaps," an attacker can hide malicious logic. A security auditor might scan the static disassembly and find no issues, while the CPU executes the hidden malicious instructions during runtime.

Results

TraceBin identified thousands of instruction errors across the SPEC benchmarks. Tools like angr and radare2 were particularly susceptible to missing instructions in Clang-compiled binaries. Most errors were traced back to Indirect Control Flow, which remains the "Achilles' heel" of static analysis. Furthermore, the authors successfully created Proof-of-Concept (PoC) trojanized versions of cpugcc and Xalan where vulnerabilities remained invisible to static tools but were fully functional.

Limitations and Future Work

The primary limitation of TraceBin is its reliance on code coverage. Since it depends on dynamic execution, it can only verify code paths that are actually triggered during the trace. Rare error handlers or dormant features may still contain disassembly errors that TraceBin cannot detect.

Future research will focus on integrating fuzzing or symbolic execution to expand code coverage. Additionally, extending TraceBin to handle self-modifying code—a common tactic in malware—and automating the process of "patching" disassemblers using dynamic trace data are high-priority objectives.

Summary updated

BibTeX
@inproceedings{wijayadi2025evaluating,
  author = {Lambang Akbar Wijayadi and Yuancheng Jiang and Roland H. C. Yap and Zhenkai Liang and Zhuohao Liu},
  title = {{Evaluating Disassembly Errors With Only Binaries}},
  booktitle = {AsiaCCS},
  year = {2025},
  doi = {10.1145/3708821.3733884},
}
Figure