Abstract
Recent research has shown that bit-flip attacks (BFAs) can manipulate deep neural networks (DNNs) via DRAM Rowhammer exploitations. Existing attacks are primarily launched over high-level DNN frameworks like PyTorch and flip bits in model weight files. Nevertheless, DNNs are frequently compiled into low-level executables by deep learning (DL) compilers to fully leverage low-level hardware primitives. The compiled code is usually high-speed and manifests dramatically distinct execution paradigms from high-level DNN frameworks. In this paper, we launch the first systematic study on the attack surface of BFA specifically for DNN executables compiled by DL compilers. We design an automated search tool to identify vulnerable bits in DNN executables and identify practical attack vectors that exploit the model structure in DNN executables with BFAs (whereas prior works make likely strong assumptions to attack model weights). DNN executables appear more "opaque" than models in high-level DNN frameworks. Nevertheless, we find that DNN executables contain extensive, severe (e.g., single-bit flip), and transferrable attack surfaces that are not present in high-level DNN models and can be exploited to deplete full model intelligence and control output labels. Our finding calls for incorporating security mechanisms in future DNN compilation toolchains.
The Shift to Compiled Executables
As deep learning moves from research labs to production, models are increasingly compiled into standalone binary executables using tools like Apache TVM or Meta’s Glow. This compilation allows models to run efficiently on CPUs and specialized hardware by leveraging low-level primitives.
Previously, security researchers focused on Bit-Flip Attacks (BFAs) targeting model weights. These attacks typically require "whitebox" knowledge, where the attacker must know the exact weight values to calculate which bits to flip. Since weights are often proprietary intellectual property, this requirement served as a significant barrier to entry. However, as shown in Figure 1, compiled DNN executables introduce a new, more accessible attack surface: the compiled DNN structure residing in the .text section of the binary.
This research reveals that the model structure—the code defining data flow—is often public or easily reverse-engineered. An attacker does not need to know the secret weights to launch a devastating attack; they can instead exploit the way the compiler translates the model into machine code.
Attack Methodology: The Search for "Superbits"
The researchers developed a two-stage attack pipeline designed to identify and exploit vulnerabilities in the compiled binary without requiring access to the victim's private weights or training data.
- Offline Profiling (Local Bit Searching): The attacker trains multiple versions of the target architecture (e.g., ResNet50) using "fake datasets" consisting of random noise. This creates a set of binaries with identical structures but different weights. By analyzing these, the attacker identifies Superbits ($\\mathcal{S}_\\mathcal{E}$)—vulnerable bits in the code section that cause model failure regardless of the underlying weights.
- Online Attack (Rowhammer): Once a superbit is identified, the attacker uses the Rowhammer exploit on DDR4 DRAM to flip that specific bit in the victim's memory. Rowhammer works by repeatedly accessing adjacent memory rows to leak electrical charge, eventually causing a bit flip in the target row without direct access.
To make this practical, the authors developed an automated tool that identifies these vulnerable bits with 70% confidence, a massive leap over the 2% success rate of random guessing.
Experimental Setup and Insights
The study evaluated 16 different DNN executables across standard datasets (CIFAR10, MNIST, Fashion-MNIST) and various architectures (ResNet50, GoogLeNet, DenseNet121). The results shattered several common security assumptions:
- Structure is the Achilles' Heel: While weights are unique to a specific trained model, the compiled code (loops, data offsets, and instruction alignments) is often identical across different deployments of the same architecture, making the attack highly transferable.
- Quantization is Not a Shield: It is a common belief that "quantized" models (using lower precision) are more robust. This study shows that quantized models are just as vulnerable to single-bit flips in their control logic.
Four Categories of Failure
Reverse-engineering successful flips revealed four primary failure modes:
- Broken Data Flow: Corrupting address calculations so the model reads from incorrect memory locations.
- Broken Control Flow: Forcing the model to skip entire layers of computation.
- Broken Data Alignment: Causing 4-byte floating-point numbers to be read at a 2-byte offset, resulting in "garbage" values.
- Broken Instruction Alignment: Turning a "no-operation" (nop) instruction into a different command that corrupts subsequent code.
Key Results and Impact
The efficiency of this attack is remarkable. On average, only 1.4 bit-flips were required to downgrade a model's accuracy to the level of a random guess (e.g., from 90% to 10%). Furthermore, 71.1% of attacks succeeded with a single bit-flip, making them incredibly difficult to detect. Beyond accuracy degradation, the authors demonstrated "pinning" attacks (forcing a specific class prediction) and generative attacks that cause GANs to produce distorted, biased images.
Conclusion
This study highlights a critical gap in current AI security. While existing defenses focus on protecting model weights, the compiled binary structure remains a severe and exploitable attack surface. The findings call for a new generation of binary-centric defenses, such as control-flow integrity (CFI) and data-flow checks, to be integrated directly into DNN compilation toolchains.
Summary updated