Emilia: Catching Iago in Legacy Code
Rongzhen Cui, Lianying Zhao, David Lie
Abstract
—There has been interest in mechanisms that enable the secure use of legacy code to implement trusted code in a Trusted Execution Environment (TEE), such as Intel SGX. However, because legacy code generally assumes the presence of an operating system, this naturally raises the spectre of Iago attacks on the legacy code. We observe that not all legacy code is vulnerable to Iago attacks and that legacy code must use return values from system calls in an unsafe way to have Iago vulnerabilities. Based on this observation, we develop Emilia, which automatically detects Iago vulnerabilities in legacy applications by fuzzing applications using system call return values. We use Emilia to discover 51 Iago vulnerabilities in 17 applications, and find that Iago vulnerabilities are widespread and common. We conduct an in-depth analysis of the vulnerabilities we found and conclude that while common, the majority (82.4%) can be mitigated with simple, stateless checks in the system call forwarding layer, while the rest are best fixed by finding and patching them in the legacy code. Finally, we study and evaluate different trade-offs in the design of Emilia.
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.
7 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- EnclaveFuzz: Finding Vulnerabilities in SGX Applications cites SmashEx: Smashing SGX Enclaves Using Exceptions
- EnclaveFuzz: Finding Vulnerabilities in SGX Applications cites COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGX
- A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding Runtimes cites Panoply: Low-TCB Linux Applications With SGX Enclaves
- SmashEx: Smashing SGX Enclaves Using Exceptions cites A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding Runtimes
- SmashEx: Smashing SGX Enclaves Using Exceptions cites Panoply: Low-TCB Linux Applications With SGX Enclaves
- SmashEx: Smashing SGX Enclaves Using Exceptions cites COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGX
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding Runtimes
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites SmashEx: Smashing SGX Enclaves Using Exceptions
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGX
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding Runtimes
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites SmashEx: Smashing SGX Enclaves Using Exceptions
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites Panoply: Low-TCB Linux Applications With SGX Enclaves
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGX
- Characterizing Trust Boundary Vulnerabilities in TEE Container Systems: An Empirical Study cites Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes
- Characterizing Trust Boundary Vulnerabilities in TEE Container Systems: An Empirical Study cites SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution
- Characterizing Trust Boundary Vulnerabilities in TEE Container Systems: An Empirical Study cites Panoply: Low-TCB Linux Applications With SGX Enclaves
- Characterizing Trust Boundary Vulnerabilities in TEE Container Systems: An Empirical Study cites COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGX
- Panoply: Low-TCB Linux Applications With SGX Enclaves cites OpenSGX: An Open Platform for SGX Research
Cited by top-tier papers7
- SmashEx: Smashing SGX Enclaves Using ExceptionsJinhua Cui, Jason Zhijingcheng Yu, Shweta Shinde, Prateek Saxena et al.CCS 2021 · 32 citations
- Pandora: Principled Symbolic Validation of Intel SGX Enclave RuntimesFritz Alder, Lesly-Ann Daniel, David F. Oswald, Frank Piessens et al.S&P 2024 · 12 citations
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic ExecutionYuanpeng Wang, Ziqi Zhang, Ningyu He, Zhineng Zhong et al.CCS 2023 · 8 citations
- EnclaveFuzz: Finding Vulnerabilities in SGX ApplicationsLiheng Chen, Zheming Li, Zheyu Ma, Yuan Li et al.NDSS 2024
- Characterizing Trust Boundary Vulnerabilities in TEE Container Systems: An Empirical StudyWeijie Liu, Hongbo Chen, Shuo Huai, Zhen Xu et al.FSE 2026
Builds on5
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei et al.CCS 2018 · 753 citations
- Panoply: Low-TCB Linux Applications With SGX EnclavesShweta Shinde, Dat Le Tien, Shruti Tople, Prateek SaxenaNDSS 2017 · 274 citations
- A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding RuntimesJo Van Bulck, David F. Oswald, Eduard Marin, Abdulla Aldoseri et al.CCS 2019 · 159 citations
- OpenSGX: An Open Platform for SGX ResearchPrerit Jain, Soham Jayesh Desai, Ming-Wei Shih, Taesoo Kim et al.NDSS 2016 · 98 citations
- COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGXMustakimur Rahman Khandaker, Yueqiang Cheng, Zhi Wang, Tao WeiASPLOS 2020 · 46 citations
Related papers
- BesFS: A POSIX Filesystem for Enclaves with a Mechanized Safety ProofShweta Shinde, Shengyi Wang, Pinghai Yuan, Aquinas Hobor et al.USENIX Security 2020
- SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave FuzzingTobias Cloosters, Johannes Willbold, Thorsten Holz, Lucas DaviUSENIX Security 2022
- IntraFuzz: Coverage-Guided Intra-Enclave Fuzzing for Intel SGX ApplicationsJinhua Cui, Qiao Peng, Yiwen Yao, Ke Ye et al.DAC 2025 · 1 citation
- TÄMU: Emulating Trusted Applications at the (GlobalPlatform)-API LayerPhilipp Mao, Li Shi, Marcel Busch, Mathias PayerS&P 2026 · 1 citation
- TeeRex: Discovery and Exploitation of Memory Corruption Vulnerabilities in SGX EnclavesTobias Cloosters, Michael Rodler, Lucas DaviUSENIX Security 2020
