CISPA
Browse

Await() a Second: Evading Control Flow Integrity by Hijacking C++ Coroutines

Download (667.86 kB)
conference contribution
posted on 2025-04-02, 17:59 authored by Marcos Sanchez BajoMarcos Sanchez Bajo, Christian RossowChristian Rossow
Code reuse attacks exploit legitimate code sequences in a binary to execute malicious actions without introducing new code. Control Flow Integrity (CFI) defenses mitigate these attacks by restricting program execution to valid code paths. However, new programming paradigms, like C++20 coroutines, expose gaps in current CFI protections. We demonstrate that, despite rigorous standardization, C++ coroutines present new vulnerabilities that undermine both coarse-grained and fine-grained CFI defenses. Coroutines, widely used in asynchronous programming, store critical execution data in writable heap memory, making them susceptible to exploitation. This paper introduces Coroutine Frame-Oriented Programming (CFOP), a novel code reuse attack that leverages these vulnerabilities across major compilers. We demonstrate how CFOP allows attackers to hijack program execution and manipulate data in CFI-protected environments. Through a series of Proof of Concept (PoC) exploits, we show the practical impact of CFOP. We also propose defensive measures to enhance coroutine security and address this emerging threat.

History

Primary Research Area

  • Secure Connected and Mobile Systems

Name of Conference

Usenix Security Symposium (USENIX-Security)

CISPA Affiliation

  • Yes

BibTeX

@conference{Sanchez Bajo:Rossow:2025, title = "Await() a Second: Evading Control Flow Integrity by Hijacking C++ Coroutines", author = "Sanchez Bajo, Marcos" AND "Rossow, Christian", year = 2025, month = 8 }

Usage metrics

    Categories

    No categories selected

    Licence

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC