The Taming of the Stack: Isolating Stack Data from Memory Errors
Kaiming Huang, Yongzhe Huang, Mathias Payer, Zhiyun Qian, Jack Sampson, Gang Tan, Trent Jaeger
摘要
—Despite vast research on defenses to protect stack objects from the exploitation of memory errors, much stack data remains at risk. Historically, stack defenses focus on the protection of code pointers, such as return addresses, but emerging techniques to exploit memory errors motivate the need for practical solutions to protect stack data objects as well. However, recent approaches provide an incomplete view of security by not accounting for memory errors comprehensively and by limiting the set of objects that can be protected unnecessarily. In this paper, we present the D ATA G UARD system that identifies which stack objects are safe statically from spatial, type, and temporal memory errors to protect those objects efficiently. D ATA G UARD improves security through a more comprehensive and accurate safety analysis that proves a larger number of stack objects are safe from memory errors, while ensuring that no unsafe stack objects are mistakenly classified as safe. D ATA G UARD ’s analysis of server programs and the SPEC CPU2006 benchmark suite shows that D ATA G UARD improves security by: (1) ensuring that no memory safety violations are possible for any stack objects classified as safe, removing 6.3% of the stack objects previously classified safe by the Safe Stack method, and (2) blocking exploit of all 118 stack vulnerabilities in the CGC Binaries. D ATA G UARD extends the scope of stack protection by validating as safe over 70% of the stack objects classified as unsafe by the Safe Stack method, leading to an average of 91.45% of all stack objects that can only be referenced safely. By identifying more functions with only safe stack objects, D ATA G UARD reduces the overhead of using Clang’s Safe Stack defense for protection of the SPEC CPU2006 benchmarks from 11.3% to 4.3%. Thus, D ATA G UARD shows that a comprehensive and accurate analysis can both increase the scope of stack data protection and reduce overheads.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects 引用了 Block Oriented Programming: Automating Data-Only Attacks
- Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Top of the Heap: Efficient Memory Error Protection of Safe Heap Objects 引用了 Stack Bounds Protection with Low Fat Pointers
- OPTISAN: Using Multiple Spatial Error Defenses to Optimize Stack Memory Protection within a Budget 引用了 SoK: Shining Light on Shadow Stacks
- OPTISAN: Using Multiple Spatial Error Defenses to Optimize Stack Memory Protection within a Budget 引用了 Block Oriented Programming: Automating Data-Only Attacks
- OPTISAN: Using Multiple Spatial Error Defenses to Optimize Stack Memory Protection within a Budget 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- OPTISAN: Using Multiple Spatial Error Defenses to Optimize Stack Memory Protection within a Budget 引用了 Stack Bounds Protection with Low Fat Pointers
- SoK: Shining Light on Shadow Stacks 引用了 Block Oriented Programming: Automating Data-Only Attacks
- Block Oriented Programming: Automating Data-Only Attacks 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Stack Bounds Protection with Low Fat Pointers 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Don't Waste My Efforts: Pruning Redundant Sanitizer Checks by Developer-Implemented Type Checks 引用了 Stack Bounds Protection with Low Fat Pointers
- DEEPTYPE: Refining Indirect Call Targets with Strong Multi-layer Type Analysis 引用了 Block Oriented Programming: Automating Data-Only Attacks
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK) 引用了 SoK: Shining Light on Shadow Stacks
引用它的顶会 Paper11
- DirtyCred: Escalating Privilege in Linux KernelZhenpeng Lin, Yuhang Wu, Xinyu XingCCS 2022 · 30 次引用
- DEEPTYPE: Refining Indirect Call Targets with Strong Multi-layer Type AnalysisTianrou Xia, Hong Hu, Dinghao WuUSENIX Security 2024 · 13 次引用
- Don't Waste My Efforts: Pruning Redundant Sanitizer Checks by Developer-Implemented Type ChecksYizhuo Zhai, Zhiyun Qian, Chengyu Song, Manu Sridharan 等USENIX Security 2024 · 8 次引用
- OPTISAN: Using Multiple Spatial Error Defenses to Optimize Stack Memory Protection within a BudgetRahul George, Mingming Chen, Kaiming Huang, Zhiyun Qian 等USENIX Security 2024 · 4 次引用
- Top of the Heap: Efficient Memory Error Protection of Safe Heap ObjectsKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson 等CCS 2024 · 3 次引用
它引用的 Paper19
- Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua 等S&P 2016 · 420 次引用
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler 等USENIX Security 2019 · 247 次引用
- SoK: Shining Light on Shadow StacksNathan Burow, Xinping Zhang, Mathias PayerS&P 2019 · 170 次引用
- Block Oriented Programming: Automating Data-Only AttacksKyriakos K. Ispoglou, Bader AlBassam, Trent Jaeger, Mathias PayerCCS 2018 · 143 次引用
- Stack Bounds Protection with Low Fat PointersGregory J. Duck, Roland H. C. Yap, Lorenzo CavallaroNDSS 2017 · 121 次引用
相关 Paper
- CGuard: Scalable and Precise Object Bounds Protection for CPiyus Kedia, Rahul Purandare, Udit Kumar Agarwal, RishabhISSTA 2023 · 1 次引用
- QuickSafe: Targeted Hardening Against Memory CorruptionJohannes Blaser, Floris Gorter, Klaus von Gleissenthall, Herbert BosS&P 2026
- Protecting the Stack with Metadata Policies and Tagged HardwareNick Roessler, André DeHonS&P 2018 · 37 次引用
- FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin 等CCS 2017 · 71 次引用
- Not All Data are Created Equal: Data and Pointer Prioritization for Scalable Protection Against Data-Oriented AttacksSalman Ahmed, Hans Liljestrand, Hani Jamjoom, Matthew Hicks 等USENIX Security 2023
