CS Paper Radar

DualGuard: Comprehensive and Efficient Memory Safety across Sequential and Speculative Execution

Sixuan Dang, Quan Zhou, Kaiming Huang, Jianan Zhu, Anitha Gollamudi, Trent Jaeger, Danfeng Zhang

cs.CR cs.PL ·submitted 2026-10-29 05:04 UTC · v1
published

Abstract

Although decades of research have yielded sophisticated mechanisms for enforcing memory safety, speculative execution can subvert these protections through transient memory operations. Conversely, defenses designed specifically for speculative safety, such as Speculative Load Hardening (SLH), cannot enforce memory safety during non-speculative execution. A naive combination of defenses from both domains raises two fundamental challenges: (1) which combination of otherwise fragmented defenses can ensure dual memory safety under speculative and non-speculative executions? (2) whether such combinations introduce redundant protections that incur unnecessary performance overhead? We present DualGuard, a unified framework for dual memory protection under non-speculative and speculative executions. DualGuard systematically analyzes memory behaviors, classifying them into four categories, and further identifies the minimal composition requirements for dual memory safety, which allow us to strategically combine existing mitigations and design new ones to avoid redundant or excessive protections. We implement DualGuard through a combination of static analysis and runtime enforcement within the LLVM infrastructure. Our evaluation demonstrates that DualGuard reduces overhead by 3%-72% compared to naive compositions of fragmented defenses. In some cases, it even incurs lower overhead than approaches that guarantee memory safety solely under either non-speculative or speculative execution.

DOI
10.14722/ndss.2027.232195

Closest papers

Nearest neighbours by meaning across the whole index.

SecDMP: Provably Secure Data Memory-Dependent Prefetching (Extended Version)

cs.CR ·2026-10-27 ·Jens Sprengers, Marton Bognar, Lesly-Ann Daniel, Frank Piessens
top venuecode/data similarity 0.74
Abstract · This is the extended version of our paper accepted at NDSS 2027 and consists of 32 pages

Data memory-dependent prefetchers (DMPs) are a microarchitectural optimization recently introduced in mainstream desktop and server CPUs. Although DMPs offer performance improvements, they have been shown to enable side-channel leakage of secrets, even from constant-time code that has been hardened against Spectre attacks. Unfortunately, existing defenses either incur significant performance overhead or, as we show, fail to prevent all DMP leakage. In this work, we address this gap by designing a defense that is both secure and efficient. First, we propose a classification of DMP leakage, categorize existing and novel attacks, and analyze which leakage classes are mitigated by existing defenses. We validate this analysis empirically by implementing the first open-source DMPs on a RISC-V processor, showing that the only existing defense that aims to preserve DMP performance fails to protect against entire leakage classes. Next, we propose SecDMP, a provably secure and efficient hardware-based defense. SecDMP requires secrets to be marked in memory and ensures that DMPs never encode these secrets in the microarchitecture---without compromising performance for public data. We formally prove that SecDMP introduces no leakage beyond a baseline semantics without DMPs. Notably, when combined with speculative-execution defenses, SecDMP restores complete microarchitectural security for constant-time code. Finally, our empirical evaluation shows that SecDMP prevents all DMP leakage while incurring minimal performance overhead and hardware cost.

0.51

VellSSLH: Sound Type-Guided Selective Speculative Load Hardening for LLVM IR

cs.CR ·2026-11-13 ·Swarn Priya
theory similarity 0.73
Abstract

Constant-time cryptographic programs written in C can still leak secrets during speculative execution. Mispredicted branches may allow instructions to access secret data and expose it through observable behavior. Speculative load hardening (SLH) addresses these leaks, but protecting values unnecessarily can introduce significant runtime overhead. We present VellSSLH, which selectively inserts speculative load hardening at LLVM IR. Programmers specify Public and Secret inputs in annotated C programs, and our analysis infers which values may become secret during speculation. The transformation then inserts misspeculation-flag operations and protections only where needed. VellSCT, our extracted checker, validates the resulting LLVM IR. We formalize speculative constant-time (SCT) security by extending Vellvm's LLVM semantics with speculative execution, attacker directives, and leakage observations. Our security type system reasons about SSA joins, symbolic values, poison, pointer provenance, and observable faults, and supports declared declassifications and trusted external services. In Rocq, we prove that programs accepted by the checker satisfy SCT, and that a reference hardening transformation preserves architectural behavior. Evaluated optimized variants are rechecked for SCT but are not covered by this preservation proof. Our mechanized guarantees apply at LLVM IR; security of the generated binary additionally depends on backend and hardware assumptions. We evaluate VellSSLH on 24 cryptographic entries on a bare-metal Intel processor. VellSSLH achieves 4.03% lower geometric-mean runtime than LLVM SLH, with 13 comparisons favoring VellSSLH, eight favoring LLVM SLH, and three inconclusive. For X25519, VellSSLH improves runtime by 22.69% over LLVM SLH with only 1.86% overhead over unprotected code. Compared with Ultimate SLH, VellSSLH achieves 19.65% lower runtime.

0.30

Beyond Single-Vulnerability Evaluation: Closing the Engineering Decision Gap Between C Retrofits and Native Safety

cs.PL cs.CR ·2026-08-16 ·Andrew Laramore, Joseph Spracklen, Murtuza Jadliwala
position similarity 0.73
Abstract

While decades of research have produced numerous retrofitted memory-safety protections for C, these mechanisms are almost exclusively evaluated in isolation, targeting specific vulnerability classes. This siloed evaluation paradigm leaves practitioners without a clear understanding of the cumulative performance costs, interoperability conflicts, and protection gaps that arise when layering defenses to achieve comprehensive safety. This paper presents a new evaluation paradigm that benchmarks natively memory-safe languages like Rust and Go against compounded C retrofits. Using standardized cross-language tasks, we evaluate the performance and protection tradeoffs of state-of-the-art mechanisms when deployed in combination. Our results demonstrate that layered C defenses incur compounding and workload-dependent performance penalties, can suffer from fundamental architectural incompatibilities, and fall short of the protection scope provided by native memory-safe languages. These findings expose a critical engineering decision gap where the true cost of backporting safety to C remains hidden from practitioners. We argue for a fundamental shift in memory-safety research: moving away from isolated evaluation toward holistic, comparative frameworks that inform the high-stakes choice between retrofitting legacy codebases and migrating to modern, safe languages.

0.04

SCHERI: Provably Secure Speculation Under the Constant-Time Policy for CHERI (Extended Version)

cs.CR cs.AR ·2026-09-15 ·Shixin Song, Davide Davoli, Elias Storme, Marton Bognar, Dominique Devriese +2 more
similarity 0.70
Abstract

Capability-based architectures such as CHERI provide strong support for the architectural isolation of software components. To additionally protect against microarchitectural leakage, software can be written in a constant-time fashion. Modern processors, however, rely heavily on speculative execution, which can invalidate the constant-time guarantees and leak isolated secrets transiently. In this work, we show that providing secure speculation for CHERI is non-trivial, and that existing proposals fail to preserve the confidentiality guarantees. We develop a formal framework for reasoning jointly about capability safety, speculative execution, and information-flow security, and use it to demonstrate potential leaks. We then present SCHERI, a new processor design within this framework, and formally prove that it provides end-to-end secure speculation guarantees for the constant-time policy. Our results provide formal foundations and practical guidance for building future capability-based processors, which are resilient to Spectre attacks for constant-time programs.

0.21

EVAX: Towards a Practical, Pro-active & Adaptive Architecture for High Performance & Security

cs.CR ·2026-11-08 ·Samira Mirbagher Ajorpaz, Daniel Moghimi, Jeffrey Neal Collins, Gilles Pokam, Nael Abu-Ghazaleh +1 more
top venuehighly cited similarity 0.68
Abstract · Author manuscript of 2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO), pp. 1218-1236 (2022). 19 pages

This paper provides an end-to-end solution to defend against known microarchitectural attacks such as speculative execution attacks, fault-injection attacks, covert and side channel attacks, and unknown or evasive versions of these attacks. Current defenses are attack specific and can have unacceptably high performance overhead. We propose an approach that reduces the overhead of state-of-art defenses by over 95%, by applying defenses only when attacks are detected. Many current proposed mitigations are not practical for deployment; for example, InvisiSpec has 27% overhead and Fencing has 74% overhead while protecting against only Spectre attacks. Other mitigations carry similar performance penalties. We reduce the overhead for InvisiSpec to 1.26% and for Fencing to 3.45% offering performance and security for not only spectre attacks but other known transient attacks as well, including the dangerous class of LVI and Rowhammer attacks, as well as covering a large set of future evasive and zero-day attacks. Critical to our approach is an accurate detector that is not fooled by evasive attacks and that can generalize to novel zero-day attacks. We use a novel Generative framework, Evasion Vaccination (EVAX) for training ML models and engineering new security-centric performance counters. EVAX significantly increases sensitivity to detect and classify attacks in time for mitigation to be deployed with low false positives (4 FPs in every 1M instructions in our experiments). Such performance enables efficient and timely mitigations, enabling the processor to automatically switch between performance and security as needed.

0.71

CHERI under Fault Injection: An Emulation-Based Security Evaluation of Capability Hardware Enhanced RISC Instructions

cs.CR cs.AR ·2026-11-15 ·Eva Sophia Schreyer
similarity 0.68
Abstract · Submitted to KTH Royal Institute on Technology as a Master Thesis

Memory-safety vulnerabilities continue to dominate real-world exploit chains despite decades of research into software mitigations. CHERI is a hardware architecture that enforces spatial and temporal memory safety by augmenting pointers with hardware-checked metadata, thus preventing software-based exploitation, but its threat model explicitly excludes fault injection. This thesis investigates whether targeted fault injection can undermine CHERI's memory-safety guarantees in a pure-capability CHERI-RISC-V environment. Two fault classes are considered: bit flips corrupting capability metadata, and fault-induced check skipping on capability store instructions. We implement fault injection primitives in a QEMU-based emulation environment, which enables deterministic, repeatable experiments without specialised hardware. With them, we demonstrate four attack scenarios: buffer overflows, control-flow hijacking, data-only attacks, and use-after-free. Each succeeds with one or two targeted faults (lower bounds under the emulation-based setting). Check skipping offers an alternative route to control-flow hijacking and data-only attacks, with a minimum of one fault. These results show that CHERI's guarantees depend on the physical integrity of capability metadata, the uninterrupted execution of metadata checks, and the integrity of the revocation bitmap: a single targeted fault can circumvent spatial safety, temporal safety, or control-flow integrity. CHERI still raises the cost of exploitation, since fault injection is a prerequisite for every attack and the sentry mechanism forces an attacker to supply a valid tagged capability or spend a second fault restoring the tag. Based on these findings, we propose mitigations: ECC-protected capability memory, capability field authentication codes, redundant execution of security-critical checks, and revocation bitmap integrity verification.

0.29

PEEK: Heterogeneous Parallelism for Privileged Error Detection in Safety-Critical Processors

cs.AR ·2026-10-02 ·Tinglue Wang, Zhenghui Guo, Bing Guo, Jiapeng Guan, Renshuang Jiang +5 more
top venue similarity 0.68
Abstract · This paper has been accepted for publication at MICRO 2026. This arXiv submission is the pre-camera-ready version; the final camera-ready ve…

Heterogeneous parallel error detection architecture has been widely studied for safeguarding OoO superscalar processors in safetycritical systems, as it achieves significantly lower hardware overhead compared to traditional LockStep, by exploiting the parallelism that exists in a secondary execution. However, previous works do not cover the protection of privileged-mode execution, impeding their effectiveness in real-world deployment. Moreover, naive extension to privileged-mode can cause a litany of issues, from abysmal performance due to high synchronization costs, to full deadlocks. Here, we present PEEK, the first privileged parallel error detection architecture. Based on a deep analysis of privileged execution, we redesign the verification pipeline, addressing all the bottlenecks and bugs identified in privileged-mode protection. Evaluated using various metrics on an RTL-level full system running Linux, PEEK achieves full-privilege protection on Linux with negligible performance slowdown and affordable hardware overhead. PEEK has been taped out using a 28nm process, and its source is available at https://anonymous.4open.science/r/PEEK-3000.

0.49

Memory Safety Isn't All You Need: Code Reuse Attacks in Memory Safe Languages

cs.CR ·2026-11-13 ·Eric Cornelissen, Musard Balliu
top venue similarity 0.67
Abstract · 19 pages, 9 figures, 4 tables, 20 listings, to be published in the 22nd ACM ASIA Conference on Computer and Communications Security (ACM ASI…

Memory safety rules out classical code reuse attacks that rely on arbitrary memory corruption, but does not eliminate code reuse altogether. Attacks such as object injection, prototype pollution, class pollution, DOM clobbering, and DOM script gadgets arise in memory-safe languages without violating the underlying memory safety abstraction. We show that these seemingly different attacks share a common structure: Attacker-controlled data influences accesses to shared runtime state, such as runtime type information, prototype or class state, and the DOM, and a value fetched from that state subsequently influences a security-sensitive operation. Drawing on this insight, we develop a language-agnostic framework that decomposes an attack into a weakness, ending in a fetch from shared runtime state, and a gadget, which propagates the fetched value to a sensitive sink. We show that the framework captures five established attack classes and use it to derive stateless, mutating, and recycling weaknesses, together with simple, vertical, and horizontal gadget structures. We further systematize existing defenses into three common strategies - mediation, minimization, and constraint - and use them to derive candidate defense directions. Finally, we develop a model language that gives a formal account of code-reuse weaknesses and potential conditions for gadgets and end-to-end vulnerabilities.

0.50