Introduction
Memory vulnerabilities such as buffer over-reads (e.g., Heartbleed) and format string bugs pose significant threats, allowing attackers to exfiltrate sensitive data directly from program memory. While selective data protection—isolating or encrypting specific sensitive variables—offers a targeted defense, existing software-based approaches often suffer from imprecision or coarse granularity. Hardware-based dynamic information flow tracking (DIFT) provides a fine-grained alternative but faces practical deployment hurdles. This paper introduces Conch, a hardware-assisted system designed to protect sensitive data dynamically while addressing real-world challenges like external input handling, granularity mismatches, and semantic conflicts.
The Conch Architecture
Conch is built on a RISC-V tagged architecture that tracks and encrypts sensitive data at the hardware level. It utilizes a 1-bit memory tag per machine word. When a word is tagged as sensitive, a hardware encryption engine transparently encrypts it using the QARMA block cipher before it is written to RAM. To ensure security, the memory address serves as a cryptographic tweak, and the OS manages per-thread encryption keys.
Secure Input Channels
A critical challenge is protecting data from external sources (files or network sockets) before it reaches user-space memory. Conch addresses this by patching the OS kernel (e.g., copy_to_user). Developers can flag sensitive inputs using a specialized O_SENSITIVE flag during file or socket operations. The kernel then automatically tags the incoming data as it is placed into the user-space buffer, ensuring protection from the moment of entry.
Addressing Granularity and Semantic Conflicts
Hardware tags typically apply to machine words (e.g., 8 bytes), whereas programs often operate on individual bytes. This leads to granularity conflicts when a single word contains both sensitive and non-sensitive data.
To maintain low memory overhead (1.56% compared to 12.5% for byte-level tagging), Conch employs "over-tagging." If a word contains any sensitive bytes, the entire word is treated as sensitive. Furthermore, to prevent "double encryption" conflicts—where hardware encryption might break applications like OpenSSL that perform their own software encryption for network transmission—Conch provides a specialized CPU instruction to safely remove memory tags once data has been processed for export.
Evaluation and Results
The authors evaluated Conch using the RISC-V Spike simulator and DRAMSim3 across the MiBench suite and several real-world applications, including Blowfish, Rijndael, Zip30, and OpenSSL.
Performance Overhead
Initial results showed an 18.3% average runtime overhead for the tagged architecture. However, the introduction of a 4KB 8-way associative tag cache reduced this average overhead to just 2.9%.
As shown in Figure 5, protecting cryptographic keys in OpenSSL incurred a negligible 2.28% runtime overhead with optimizations. Applications with intense memory I/O, such as Zip30, experienced higher overheads (~15.89%). The "over-tagging" strategy proved highly efficient; for OpenSSL, it contributed only an additional 2.16% to the total overhead while ensuring robust security.
Discussion and Limitations
Conch demonstrates that hardware-software co-design is essential for practical data protection. By modifying the OS kernel to act as a secure bridge and accepting "over-tagging" as a pragmatic compromise, Conch achieves high security with minimal performance impact.
However, some limitations remain. Conch assumes the attacker cannot hijack the program's control flow; arbitrary code execution could lead to abuse of the tag-removal instruction. Additionally, the system does not currently defend against side-channel or cold-boot attacks. Future work may focus on optimizing tag checks for I/O-heavy applications like Zip30 to further reduce performance bottlenecks.
Summary updated