# compiler hardening

Compiler hardening uses compiler options and features to improve the security of compiled applications and resulting binaries.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

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

DevFeed: [VellSSLH: Sound Type-Guided Selective Speculative Load Hardening for LLVM IR](<https://devfeed.tech/articles/vellsslh-sound-type-guided-selective-speculative-load-hardening-for-llvm-ir-136054.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.18463>)

Author: Swarn Priya

Published: 2026-11-16T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [side channel](<https://devfeed.tech/topics/side-channel.md>), [compiler hardening](<https://devfeed.tech/topics/compiler-hardening.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [cryptographic](<https://devfeed.tech/tags/cryptographic.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [ir](<https://devfeed.tech/tags/ir.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [llvm-ir](<https://devfeed.tech/tags/llvm-ir.md>), [load](<https://devfeed.tech/tags/load.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [secret](<https://devfeed.tech/tags/secret.md>), [security](<https://devfeed.tech/tags/security.md>), [semantics](<https://devfeed.tech/tags/semantics.md>), [ssa](<https://devfeed.tech/tags/ssa.md>), [transformation](<https://devfeed.tech/tags/transformation.md>), [type](<https://devfeed.tech/tags/type.md>), [type-system](<https://devfeed.tech/tags/type-system.md>), [x25519](<https://devfeed.tech/tags/x25519.md>)

### AI overview

VellSSLH selectively inserts speculative load hardening in LLVM IR, using annotated Public and Secret inputs to infer which values may become secret during speculation and protect them where needed. Its extracted checker validates the IR; Rocq proofs establish speculative constant-time security for accepted programs and architectural behavior preservation for a reference transformation. Evaluated optimized variants are rechecked for security but are outside that preservation proof, and binary security still depends on backend and hardware assumptions. On 24 cryptographic entries tested on a bare-metal Intel processor, VellSSLH had 4.03% lower geometric-mean runtime than LLVM SLH (13 comparisons favored VellSSLH, eight favored LLVM SLH, and three were inconclusive). For X25519, it was 22.69% faster than LLVM SLH with 1.86% overhead over unprotected code; it also had 19.65% lower runtime than Ultimate SLH.

### Source excerpt

arXiv:2611.18463v1 Announce Type: new 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.

## FreeSBee: A Constant-Time Compilation Pipeline

DevFeed: [FreeSBee: A Constant-Time Compilation Pipeline](<https://devfeed.tech/articles/freesbee-a-constant-time-compilation-pipeline-119897.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.20171>)

Author: Julian Ganz, David Knothe, David Oswald, Sebastian Reiter, Thorben Schneider, Simon Wegener

Published: 2026-11-06T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [compiler hardening](<https://devfeed.tech/topics/compiler-hardening.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [application](<https://devfeed.tech/tags/application.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [attacks](<https://devfeed.tech/tags/attacks.md>), [automated](<https://devfeed.tech/tags/automated.md>), [code](<https://devfeed.tech/tags/code.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [control](<https://devfeed.tech/tags/control.md>), [core](<https://devfeed.tech/tags/core.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [devices](<https://devfeed.tech/tags/devices.md>), [execution](<https://devfeed.tech/tags/execution.md>), [flow](<https://devfeed.tech/tags/flow.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [information](<https://devfeed.tech/tags/information.md>), [iot](<https://devfeed.tech/tags/iot.md>), [security](<https://devfeed.tech/tags/security.md>), [side-channels](<https://devfeed.tech/tags/side-channels.md>), [static-timing-analysis](<https://devfeed.tech/tags/static-timing-analysis.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

FreeSBee hardens compiled code against timing side-channels by using taint analysis to locate code that depends on sensitive data, then applying automated control-flow transformations in the compiler. The authors evaluate the workflow on a realistic application running on a RISC-V core, using static timing analysis and statistical methods. They report that it does not achieve cycle-accurate constant-time execution, though the statistical results suggest the hardened binary is safe against timing attacks.

### Source excerpt

arXiv:2610.20171v2 Announce Type: replace Abstract: Constant-time execution is an important security property, especially for IoT devices, that prevents the leakage of sensitive information over timing side-channels. However, achieving constant-time execution is very hard when going down to the cycle level, at least on realistic devices. A lot of research is concerned with producing tools that either determine whether code is constant-time or that ensure it is compiled into a constant-time binary, with various degrees of accuracy. In this work, we present and evaluate a full workflow for hardening against timing side-channels during compilation. It starts with taint analysis to determine the code locations that depend on sensitive information. These are then the object of automated control-flow transformations inside the compiler to seal possible timing side-channels. We evaluate our workflow in detail on a realistic application running on a RISC-V core using both static timing analysis and statistical methods. Even though we do not reach cycle-accurate constant-time execution, our statistical results suggest that our hardened binary is safe against timing attacks.

## Extending LLVM's BOLT-based Binary Analyser to Validate Stack Variable Initialisation

DevFeed: [Extending LLVM's BOLT-based Binary Analyser to Validate Stack Variable Initialisation](<https://devfeed.tech/articles/extending-llvm-s-bolt-based-binary-analyser-to-validate-stack-variable-initialisation-92089.md>)

Original publisher: [Read original article](<http://blog.quarkslab.com/extending-llvms-bolt-based-binary-analyser-to-validate-stack-variable-initialisation.html>)

Author: Francesco Cagnin

Published: 2026-06-08T22:00:00Z

Content type: article

Language: en

Sources: [Quarkslab](<https://devfeed.tech/sources/quarkslab.md>)

Topics: [compiler hardening](<https://devfeed.tech/topics/compiler-hardening.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [OSTIF](<https://devfeed.tech/topics/ostif.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [automatic-initialisation](<https://devfeed.tech/tags/automatic-initialisation.md>), [binary-analysis](<https://devfeed.tech/tags/binary-analysis.md>), [bolt](<https://devfeed.tech/tags/bolt.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [compiler-hardening](<https://devfeed.tech/tags/compiler-hardening.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [ostif](<https://devfeed.tech/tags/ostif.md>), [program-analysis](<https://devfeed.tech/tags/program-analysis.md>), [scanner](<https://devfeed.tech/tags/scanner.md>), [security](<https://devfeed.tech/tags/security.md>), [stack](<https://devfeed.tech/tags/stack.md>), [static](<https://devfeed.tech/tags/static.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>), [tool](<https://devfeed.tech/tags/tool.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

Quarkslab's first BOLT-based scanner checks x86-64 binaries for stack reads that may use uninitialised memory, supporting validation of `-ftrivial-auto-var-init`. It combines a load-oracle approach, using stack loads as clues to automatic variables, with a store-witness approach that checks whether loaded bytes were written along relevant control-flow paths. The scanner recovers direct and derived stack accesses, recognises common block initialisation patterns, and checks initialisation within and across functions; it can also detect possible uninitialised stack reads in binaries without the flag. Evaluation covered GNU coreutils 9.5 built with GCC and Clang at several optimisation levels, with and without zero initialisation. The authors describe this as an initial implementation: large binaries produce enough false positives to make manual triage cumbersome. They suggest symbolic execution, DWARF-assisted variable recovery, and differential compilation as possible refinements.

### Source excerpt

The Open Source Technology Improvement Fund (OSTIF) commissioned Quarkslab to extend the BOLT-based static binary analyser in LLVM to support additional compiler flags for security hardening. This work resulted in the first iteration of a scanner for validating the implementation of -ftrivial-auto-var-init.

## FORTIFY\_SOURCE

DevFeed: [FORTIFY\_SOURCE](<https://devfeed.tech/articles/fortify-source-38928.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2013-08-15-fortify_source>)

Author: Marek

Published: 2013-08-14T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [compiler hardening](<https://devfeed.tech/topics/compiler-hardening.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>), [Fedora](<https://devfeed.tech/topics/fedora.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [asm](<https://devfeed.tech/tags/asm.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [attacks](<https://devfeed.tech/tags/attacks.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [buffer-overflow](<https://devfeed.tech/tags/buffer-overflow.md>), [c](<https://devfeed.tech/tags/c.md>), [canary](<https://devfeed.tech/tags/canary.md>), [code](<https://devfeed.tech/tags/code.md>), [distributions](<https://devfeed.tech/tags/distributions.md>), [fedora](<https://devfeed.tech/tags/fedora.md>), [function](<https://devfeed.tech/tags/function.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [linux](<https://devfeed.tech/tags/linux.md>), [options](<https://devfeed.tech/tags/options.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programmers](<https://devfeed.tech/tags/programmers.md>), [protection](<https://devfeed.tech/tags/protection.md>), [security](<https://devfeed.tech/tags/security.md>), [stack](<https://devfeed.tech/tags/stack.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

### AI overview

The excerpt describes two GCC protections that Ubuntu and Fedora reportedly enable by default. `-fstack-protector` adds a canary to functions using `alloca` or buffers larger than 8 bytes; it checks the value before returning and calls `__stack_chk_fail` if it changed, detecting some stack overwrites at a performance cost. `-D_FORTIFY_SOURCE=2` can replace calls such as `strcpy`, `memcpy`, `memset`, and `strncpy` with checked variants when GCC knows the destination size. For example, it transforms `strcpy` to `__strcpy_chk` with the buffer length; an overrun causes a buffer overflow failure. The text presents both as defenses against some buffer overflow attacks, not comprehensive prevention.

### Source excerpt

FORTIFY_SOURCE In recent years Linux distributions started treating security more seriously. Out of many security features two are directly affecting C programmers: and . These GCC options are now enabled by default on Ubuntu and Fedora. What do these options do?