Defending Against Data-Oriented Programming and Non-Control Data Attacks

This direction is split into other directions: non-control data corruption. Its last version stays readable and citable here.

Version 1 of 129 papers35 conceptsfrozen 2026-10-04

For years, software security research focused on a single, high-stakes goal: keeping the "train" of program execution on its tracks. This is the essence of Control-Flow Integrity (CFI). By ensuring that a program only jumps to valid locations—preventing attackers from hijacking return addresses or function pointers—CFI mechanisms like those proposed by Ali José Mashtizadeh and colleagues in Cryptographically Enforced Control Flow Integrity effectively neutralized traditional code-injection and Return-Oriented Programming (ROP) attacks.

However, a more subtle threat has emerged. Even if the train stays on the tracks, an attacker can still tamper with the cargo. This is the domain of Data-Oriented Programming (DOP) and non-control data attacks.

The Gap in Control-Flow Integrity

The fundamental limitation of CFI is that it ignores "non-control data"—variables that do not directly determine the next instruction to be executed but do determine the logic of the program. As Michael Dalton and Hari Kannan point out in Real-World Buffer Overflow Protection for Userspace and Kernelspace, an adversary can manipulate privilege flags, user IDs, or configuration strings without ever corrupting a pointer.

Imagine a simple if (is_admin) check. A CFI defense ensures the program jumps to the correct branch based on the value of is_admin. But if an attacker uses a memory vulnerability to flip the is_admin bit from 0 to 1, the program's execution path remains "valid" according to the control-flow graph, yet the security of the system is entirely subverted.

Data-Oriented Programming (DOP)

DOP takes this a step further. Instead of just flipping a single flag, an attacker identifies a sequence of legitimate program instructions—"data gadgets"—and chains them together by manipulating the data flow between them.

As Thomas Nyman and his co-authors explain in HardScope: Thwarting DOP with Hardware-assisted Run-time Scope Enforcement, DOP allows an attacker to execute arbitrary expressive logic (loops, conditionals, arithmetic) using only the program's existing, "safe" code. Because the control flow never deviates from the intended graph, standard defenses like $\mu$RAI or HCIC are blind to the intrusion.

Emerging Defenses: Protecting the Data Flow

To counter these attacks, researchers are moving toward Data-Flow Integrity (DFI) and value-based constraints. The goal is to ensure that every piece of data read by an instruction was actually produced by the instruction the compiler intended.

1. Enforcing Lexical Scope in Hardware

One intuitive approach is to restrict what data an instruction can "see." Thomas Nyman and the HardScope team proposed a hardware-assisted mechanism that enforces variable visibility rules at runtime. By extending the processor's ISA to understand the "scope" of variables, the system prevents an attacker from using a gadget in one function to corrupt a variable that should only be accessible to another.

2. Value-Based Constraints

Traditional CFI is "context-insensitive"—it knows where a branch can go, but not where it should go based on current data. Dongjae Jung and colleagues introduced vCFI (Value-Based Constraint CFI), which uses static analysis to identify data that influences control flow. By protecting these specific values in secure shadow memory, vCFI ensures that branches are only taken if the underlying data justifies them.

3. Kernel-Level Data Integrity

The OS kernel is a prime target for non-control data attacks, such as privilege escalation. Chengyu Song and Taesoo Kim developed KENALI, which brings DFI to the kernel. KENALI automatically identifies critical access-control data and uses hardware-assisted isolation to prevent unauthorized modifications, stopping attacks that bypass code-centric defenses like MultiK.

Beyond Traditional Software: CPS and LLMs

The threat of data-oriented attacks extends into specialized domains:

  • Cyber-Physical Systems (CPS): In systems controlling physical hardware, an attacker might manipulate sensor data to cause a physical failure. Ke Tian and Danfeng Yao proposed Orpheus, which detects anomalies by checking if the program's internal data state remains consistent with the laws of physics.
  • Large Language Models (LLMs): Even in AI, the distinction between "data" and "instructions" is blurring. Chawin Sitawarin and Nils Philipp Walter have explored Soft Instruction Control (SIC) to prevent prompt injection, where malicious logic is hidden within seemingly inert data structures like JSON.

Conclusion

As control-flow defenses mature, the "front door" of software exploitation is closing. However, as Wenjing Wang and others have observed, this has only pushed attackers toward the "side door" of data-flow manipulation. The future of system security lies in mechanisms that can verify not just the sequence of instructions, but the integrity and provenance of the data those instructions process.

Papers in this version

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_defending_against_data_oriented_programm_f7d6a4d2,
  title = {Defending Against Data-Oriented Programming and Non-Control Data Attacks},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/defending-against-data-oriented-programming-and-non-control-data-attacks/rdr_f7d6a4d275ac4351926736c43442f78a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-22},
}

This exact version (version 1, frozen text):

@misc{lacuna_defending_against_data_oriented_programm_f7d6a4d2_v1,
  title = {Defending Against Data-Oriented Programming and Non-Control Data Attacks},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/defending-against-data-oriented-programming-and-non-control-data-attacks/rdr_f7d6a4d275ac4351926736c43442f78a/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-22},
}