TL;DR
This paper introduces PIFT, a novel approach to Dynamic Information Flow Tracking (DIFT) that uses secure page allocation to efficiently track data taint. By assigning a single taint bit to entire memory pages, PIFT significantly reduces memory overhead and performance degradation compared to existing DIFT methods, while still effectively protecting critical program data from malicious attacks.
What Problem Does This Paper Address?
Software security is a critical concern, with attackers exploiting vulnerabilities to inject malicious code or hijack program control flow. Dynamic Information Flow Tracking (DIFT) is a powerful defense mechanism that monitors the propagation of "tainted" data (data originating from untrusted sources) to detect and prevent such attacks. However, existing DIFT solutions face a trade-off: software-based approaches incur significant performance overhead, while hardware-based solutions often require complex processor redesign and can be inflexible. This paper addresses the need for a DIFT solution that is both efficient and effective, minimizing performance impact and hardware complexity.
Methods
PIFT's core innovation lies in its use of secure page allocation for taint tracking. Instead of associating a taint bit with every individual data value, PIFT aggregates data based on their taint status. Trusted data is placed in "trusted" memory pages, and untrusted data in "untrusted" memory pages. A single taint bit is stored in the page table entry for each page, making the taint storage overhead virtually zero.
Key aspects of the PIFT approach include:
- Compile-aided Process: The compiler plays a crucial role in classifying data as trusted (TR) or untrusted (UTR) and allocating them to appropriate memory pages. This classification can be done statically or aided by profiling.
- Page-level Taint Aggregation: The fundamental shift from per-word taint tracking to per-page taint tracking is the main efficiency driver.
- Trusted/Untrusted Memory Pages: The system dynamically allocates memory into distinct trusted and untrusted pages.
- Architectural Augmentations: PIFT requires minimal hardware modifications, primarily widening the register file by one bit to store taint information and adding logic for taint propagation and checking.
- Overwriting Policy Enforcement: The system enforces a policy that prevents untrusted data from overwriting trusted memory pages, raising alarms upon violation.
- Handling Critical Data: Critical program elements like return addresses, system call arguments, and indirect jump targets are explicitly placed in trusted pages to prevent malicious manipulation.
- Dual Stacks: For enhanced security, PIFT utilizes two stacks: one for trusted data and another for untrusted data, requiring some duplication of stack-related hardware.
Datasets
The paper evaluates PIFT using benchmarks from the MiBench suite. They also created three micro-benchmarks to specifically test stack buffer overflow, format string vulnerabilities, and heap corruption attacks. These micro-benchmarks are designed to demonstrate the effectiveness of PIFT in detecting specific attack vectors.
Key Insights and Ideas
- Page-level Taint is Sufficient: The most significant insight is that tracking taint at the page level, rather than the word level, is sufficient to detect many critical attacks, drastically reducing overhead.
- Zero Taint Storage Overhead: By leveraging unused bits in page table entries, PIFT achieves near-zero memory overhead for taint storage, a major advantage over prior methods.
- Compile-Time Classification is Key: The reliance on compile-time analysis and programmer hints for data classification is crucial for the efficiency and effectiveness of PIFT.
- Minimal Hardware Impact: The approach demonstrates that significant security enhancements can be achieved with relatively minor architectural modifications, making it more practical than full hardware redesigns.
- Protection Against Diverse Attacks: PIFT effectively protects against both low-level memory corruption (like buffer overflows) and high-level semantic attacks by ensuring critical control flow data remains untainted.
Key Results
The paper reports that PIFT achieves:
- Low Memory Overhead:
- Function duplication: 1.181% average overhead.
- Global data duplication: 0.100% average overhead.
- Heap data duplication: 0.024% average overhead.
- Dual stacks: 5.371% average overhead (with some benchmarks showing higher, e.g., Dijkstra at 65.63%).
- Negligible Performance Degradation: Table 5 shows that PIFT only slightly increases execution cycles, with an average performance overhead of less than 0.01% for the tested benchmarks. This is attributed to efficient page table lookups and minimal architectural changes.
- Effective Attack Detection: The micro-benchmarks demonstrate PIFT's ability to prevent attacks that attempt to overwrite critical memory locations, such as return addresses, by enforcing the trusted/untrusted page allocation policy.
Limitations and Future Work
The authors acknowledge the following limitations:
- Decision Data Attacks: PIFT cannot directly address "decision data attacks," where an attacker modifies local data that influences program branching decisions.
- OS Modification: For multi-application systems, the operating system needs to be modified to support PIFT, particularly for context switching and managing the new registers for dual stacks.
- Potential for False Alarms: While not explicitly detailed as a major issue, the paper mentions the need to avoid false alarms when no attack is present.
Future work could involve:
- Complementary Techniques: Combining PIFT with other signature-based or behavioral analysis techniques to address decision data attacks.
- Further OS Integration: Developing more robust OS integration for PIFT to support complex multi-tasking environments.
- Dynamic Taint Classification: Exploring more sophisticated methods for dynamically classifying data taint at runtime, beyond compile-time hints.
Summary updated