Lune

EuroSys2024Top-tier venue

Polynima: Practical Hybrid Recompilation for Multithreaded Binaries

Chinmay Deshpande, Fabian Parzefall, Felicitas Hetzelt, Michael Franz

Abstract

The maintenance of software distributed in its binary form can become challenging over time, due to the lack of vendor support or obsolete build environments. This can be costly when dealing with critical security vulnerabilities that are difficult to fix on a binary level. Moreover, advances in compiler technologies of the past decades remain unavailable to the users of such legacy binaries for performing optimizations and transformations. Binary recompilers aim to bridge this divide by "lifting" binary executables to compilerlevel intermediate representations (IR) and "lowering" them back again. But, current recompilers fail on that promise as they rely on unsound heuristics or impose high tracing overheads. Crucially, no existing recompiler addresses the specific challenges imposed by multithreaded programs that are ubiquitous in the modern software space.

To address these challenges, we present Polynima, a binary recompiler that supports the lifting and recompilation of x86/x64 multithreaded binaries while introducing a moderate 1.23x slowdown. We propose a hybrid control flow recovery approach that combines the benefits of static and dynamic techniques while providing an efficient strategy to handle unknown paths. Polynima enables the use of the rich LLVM compiler ecosystem to fix and improve legacy multithreaded binaries, which we demonstrate by mitigating a critical synchronization issue in a FTP server binary. We also leverage its functional IR to introduce a novel dynamic analysis to detect implicit synchronization primitives in binaries, which we use to further improve performance of the output. Finally, we evaluate the generality and correctness of

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Arancini: A Hybrid Binary Translator for Weak Memory Model Architectures cites Lasagne: a static binary translator for weak memory model architectures
  • Arancini: A Hybrid Binary Translator for Weak Memory Model Architectures cites AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMM
  • DecLLM: LLM-Augmented Recompilable Decompilation for Enabling Programmatic Use of Decompiled Code cites SoK: Demystifying Binary Lifters Through the Lens of Downstream Applications
  • DecLLM: LLM-Augmented Recompilable Decompilation for Enabling Programmatic Use of Decompiled Code cites BinRec: dynamic binary lifting and recompilation
  • DecLLM: LLM-Augmented Recompilable Decompilation for Enabling Programmatic Use of Decompiled Code cites SoK: All You Ever Wanted to Know About x86/x64 Binary Disassembly But Were Afraid to Ask
  • No More Translation at Runtime: LLM-Empowered Static Binary Translation cites SoK: Demystifying Binary Lifters Through the Lens of Downstream Applications
  • No More Translation at Runtime: LLM-Empowered Static Binary Translation cites Lasagne: a static binary translator for weak memory model architectures
  • No More Translation at Runtime: LLM-Empowered Static Binary Translation cites DecLLM: LLM-Augmented Recompilable Decompilation for Enabling Programmatic Use of Decompiled Code
  • No More Translation at Runtime: LLM-Empowered Static Binary Translation cites AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMM
  • No More Translation at Runtime: LLM-Empowered Static Binary Translation cites BinRec: dynamic binary lifting and recompilation
  • Diatom: Polylithic Binary Lifting with Data-Flow Summaries and Type-Aware IR Linking cites SoK: Demystifying Binary Lifters Through the Lens of Downstream Applications
  • Diatom: Polylithic Binary Lifting with Data-Flow Summaries and Type-Aware IR Linking cites Lasagne: a static binary translator for weak memory model architectures
  • Diatom: Polylithic Binary Lifting with Data-Flow Summaries and Type-Aware IR Linking cites BinRec: dynamic binary lifting and recompilation
  • Diatom: Polylithic Binary Lifting with Data-Flow Summaries and Type-Aware IR Linking cites SoK: All You Ever Wanted to Know About x86/x64 Binary Disassembly But Were Afraid to Ask
  • AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMM cites Lasagne: a static binary translator for weak memory model architectures
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. DecLLM: LLM-Augmented Recompilable Decompilation for Enabling Programmatic Use of Decompiled CodeWai Kin Wong, Daoyuan Wu, Huaijin Wang, Zongjie Li et al.ISSTA 2025 · 8 citations
  2. Arancini: A Hybrid Binary Translator for Weak Memory Model ArchitecturesSebastian Reimers, Dennis Sprokholt, Martin Fink, Theofilos Augoustis et al.ASPLOS 2026 · 1 citation
  3. No More Translation at Runtime: LLM-Empowered Static Binary TranslationZhibo Liu, Huaijin Wang, Wai Kin Wong, Daoyuan Wu et al.EuroSys 2026 · 1 citation
  4. Diatom: Polylithic Binary Lifting with Data-Flow Summaries and Type-Aware IR LinkingAnshunkang Zhou, Charles ZhangOOPSLA 2026 · 1 citation

Builds on6

  1. SoK: All You Ever Wanted to Know About x86/x64 Binary Disassembly But Were Afraid to AskChengbin Pang, Ruotong Yu, Yaohui Chen, Eric Koskinen et al.S&P 2021 · 102 citations
  2. BinRec: dynamic binary lifting and recompilationAnil Altinay, Joseph Nash, Taddeus Kroes, Prabhu Rajasekaran et al.EuroSys 2020 · 51 citations
  3. SoK: Demystifying Binary Lifters Through the Lens of Downstream ApplicationsZhibo Liu, Yuanyuan Yuan, Shuai Wang, Yuyan BaoS&P 2022 · 29 citations
  4. Lasagne: a static binary translator for weak memory model architecturesRodrigo C. O. Rocha, Dennis Sprokholt, Martin Fink, Redha Gouicem et al.PLDI 2022 · 21 citations
  5. AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMMMartin Beck, Koustubha Bhat, Lazar Stricevic, Geng Chen et al.ASPLOS 2023 · 9 citations

Related papers

  1. Lifting Optimized Binaries to Canonical Compiler IR via Structure-Aware Retrieval and Iterative VerificationXiaoao Zhu, Jie Ren, Zhiqiang Li, Jie Zheng et al.ACL 2026
  2. What You Trace is What You Get: Dynamic Stack-Layout Recovery for Binary RecompilationFabian Parzefall, Chinmay Deshpande, Felicitas Hetzelt, Michael FranzASPLOS 2024 · 5 citations
  3. Improving Security Tasks Using Compiler Provenance Information Recovered At the Binary-LevelYufei Du, Omar Alrawi, Kevin Z. Snow, Manos Antonakakis et al.CCS 2023 · 8 citations
  4. Incremental CFG patching for binary rewritingXiaozhu Meng, Weijie LiuASPLOS 2021 · 8 citations
  5. Reassembly is Hard: A Reflection on Challenges and StrategiesHyungseok Kim, Soomin Kim, Junoh Lee, Kangkook Jee et al.USENIX Security 2023
Dusk over the sea between two cliffs drawn in fine vertical lines