Abstract: Operating system kernels serve as the fundamental root of trust, yet they remain vulnerable to memory corruption. While Control-Flow Integrity (CFI) protects execution paths, it is ineffective against non-control-data attacks that manipulate critical variables like User IDs. This paper presents KENALI, a system that achieves practical Data-Flow Integrity (DFI) for the Linux kernel. By automatically identifying security-critical data and utilizing a two-layer hardware-assisted isolation technique, KENALI defeats privilege escalation attacks with a performance overhead of only 7–15%.
The Challenge: Beyond Control-Flow Integrity
Traditional kernel defenses often focus on Control-Flow Integrity (CFI), which ensures that the CPU only executes code along a valid control-flow graph. However, attackers have pivoted to non-control-data attacks. In these scenarios, the execution flow remains legitimate, but the attacker overwrites sensitive data—such as changing a process's UID to zero—to gain root privileges.
Existing Data-Flow Integrity (DFI) solutions, which could theoretically prevent these attacks, have historically been too slow for production use, often exceeding 100% performance overhead. KENALI addresses this by narrowing the scope of DFI to the specific data regions that govern security decisions.
System Architecture and Methods
KENALI consists of two primary components: an automated inference tool (INFERDISTS) and an efficient enforcement mechanism (PROTECTDISTS).
1. Automated Inference (INFERDISTS)
Rather than requiring manual labeling, KENALI uses static analysis to identify "distinguishing regions." It looks for kernel functions that return security-related error codes (e.g., -EACCES) and performs dependency analysis to find all variables and pointers that influence these checks. This allows the system to automatically "hook" into the kernel's security intent.
2. Efficient Enforcement (PROTECTDISTS)
To maintain high performance, KENALI employs a two-layer protection scheme:
- Layer 1 (Coarse-grained): It creates a Shadow Address Space. By leveraging ARM64's Address Space Identifier (ASID) tagging, KENALI maps the same physical memory to two different virtual addresses with distinct permissions. This allows the kernel to switch between "trusted" and "untrusted" views of memory without expensive TLB flushes.
- Layer 2 (Fine-grained): Within critical regions, it enforces a Write Integrity Test (WIT). By focusing on protecting writes rather than verifying every read, the system drastically reduces the number of required instrumentation checks.
Evaluation and Results
The system was implemented for the ARM64 Linux kernel and evaluated on a Google Nexus 9 tablet using standard Android benchmarks (AnTuTu, Geekbench, PCMark, and Vellamo).
- Security Effectiveness: KENALI successfully mitigated real-world vulnerabilities (such as CVE-2013-6282) and stopped privilege escalation attacks that bypass state-of-the-art CFI.
- Automation Scale: The system automatically identified and protected 2,419 critical data structures within the Linux kernel.
- Performance Impact: Macro-benchmarks showed a modest overhead of 7–15%, a significant improvement over previous software-only DFI implementations. The binary size increased by only 5.42%.
Limitations and Future Directions
While KENALI effectively mitigates spatial memory corruption, it remains partially vulnerable to Use-After-Free (UAF) attacks, which represent a temporal vulnerability. Additionally, the system's precision is tied to the underlying static points-to analysis; overly conservative analysis can increase overhead, while gaps in analysis could miss dependencies. Finally, current CPU-enforced protections do not account for Direct Memory Access (DMA) attacks, suggesting that future iterations should integrate IOMMU support to close this hardware gap.
Summary updated