Abstract
Memory corruption vulnerabilities often enable attackers to take control of a target system by overwriting control-flow relevant data (such as return addresses and function pointers), which are potentially stored in close proximity of related, typically user-controlled data on the stack. In this paper, we propose ProConDa, a general approach for protecting control-flow relevant data on the stack. ProConDa leverages hardware features to enforce a strict separation between control-flow relevant and regular data of programs written in non-memory-safe languages such as C. Contrary to related approaches, ProConDa does not rely on information hiding and is therefore not susceptible to several recent attacks specifically targeting information hiding as a foundation for memory isolation. We show that ProConDa enforcement is compatible with existing software by applying a software-based prototype to industry benchmarks on an ARM CPU running Linux.
Introduction
Programs written in unmanaged languages like C and C++ remain highly susceptible to memory corruption vulnerabilities, such as buffer overflows. Attackers exploit these flaws to overwrite "control data" on the stack—specifically return addresses and function pointers—to hijack execution flow, often via Return-Oriented Programming (ROP).
Existing defenses like Control Flow Integrity (CFI) and Address Space Layout Randomization (ASLR) have notable limitations. CFI typically validates jump destinations only after corruption has occurred, at which point the program state may already be compromised. ASLR and Code Pointer Integrity (CPI) rely on "information hiding," which can be bypassed through memory disclosure exploits. ProConDa addresses these gaps by enforcing control data integrity at the moment of the write operation, without relying on secrets or randomization.
Methodology
ProConDa introduces the concept of Write Instruction Origin (WIO) checking. This mechanism ensures that only statically verified, legitimate instructions are permitted to modify control-flow data. The approach is implemented in three phases:
- Control Data Identification (Static Analysis): The system analyzes ARM assembly code to identify instructions that modify control flow (e.g., branches or pops to the program counter). It then traces these instructions to identify the specific stack memory addresses designated for control data.
- Write Instruction Identification (Dynamic Analysis): The program is executed under a debugger (GDB) using test inputs to observe which instructions legitimately write to the identified control data addresses. This process builds a "Data Source Graph" that maps authorized instructions to specific memory locations.
- WIO Enforcement: The binary is rewritten to move all control data to a dedicated, read-only memory section (
.proconda). Legitimate write instructions are instrumented to temporarily unlock this memory (usingmprotectin the prototype), perform the write, and immediately re-lock it.
If an attacker attempts an unauthorized write via a buffer overflow, the instruction will lack the necessary "unlock" instrumentation. The write will fail against the read-only memory, triggering a segmentation fault and halting the attack instantly.
Evaluation
Security Effectiveness
The security of ProConDa was evaluated using real-world applications with known vulnerabilities: ncompress 4.2.4, polymorph 0.40, and htget 0.93. ProConDa successfully prevented control data corruption in 100% of the tested exploit scenarios.
Performance and Overhead
Performance was measured using the SPEC CPU2006 integer benchmarks.
- Software Prototype: The initial prototype using
mprotectsystem calls incurred significant runtime overhead (40% to 300%) due to the high cost of context switching. - Hardware Simulation: To estimate performance with native hardware support, the authors replaced
mprotectcalls withNOPinstructions. This resulted in a practical average runtime overhead of approximately 4%. - Memory Footprint: The instrumentation and dedicated memory sections increased the average memory footprint by only 1.96%.
Discussion and Conclusion
ProConDa demonstrates that prevention is superior to post-corruption detection. By intercepting illegal writes as they occur, the system preserves the program state and simplifies debugging by pinpointing the exact vulnerable code segment. Furthermore, because ProConDa does not rely on information hiding, it is immune to memory disclosure attacks that bypass ASLR.
The primary limitation of the current approach is its dependency on test coverage during Phase 2; if a legitimate execution path is not exercised during dynamic analysis, it may result in a false positive crash in production. Future work will focus on leveraging emerging hardware features, such as Intel Memory Protection Keys (MPK), to enforce WIO checks natively, achieving the high performance observed in simulations while maintaining robust security.
Summary updated