Lune

CCS2016顶会

TypeSan: Practical Type Confusion Detection

István Haller, Yuseok Jeon, Hui Peng, Mathias Payer, Cristiano Giuffrida, Herbert Bos, Erik van der Kouwe

摘要

The low-level C++ programming language is ubiquitously used for its modularity and performance. Typecasting is a fundamental concept in C++ (and object-oriented programming in general) to convert a pointer from one object type into another. However, downcasting (converting a base class pointer to a derived class pointer) has critical security implications due to potentially different object memory layouts. Due to missing type safety in C++, a downcasted pointer can violate a programmer's intended pointer semantics, allowing an attacker to corrupt the underlying memory in a type-unsafe fashion. This vulnerability class is receiving increasing attention and is known as type confusion (or badcasting). Several existing approaches detect different forms of type confusion, but these solutions are severely limited due to both high run-time performance overhead and low detection coverage. This paper presents TypeSan, a practical type-confusion detector which provides both low run-time overhead and high detection coverage. Despite improving the coverage of state-of-the-art techniques, TypeSan significantly reduces the type-confusion detection overhead compared to other solutions. TypeSan relies on an efficient per-object metadata storage service based on a compact memory shadowing scheme. Our scheme treats all the memory objects (i.e., globals, stack, heap) uniformly to eliminate extra checks on the fast path and relies on a variable compression ratio to minimize run-time performance and memory overhead. Our experimental results confirm that TypeSan is practical, even when explicitly checking almost all the relevant typecasts in a given C++ program. Compared to the state of the art, TypeSan yields orders of magnitude higher coverage at 4-10 times lower performance overhead on SPEC and 2 times on Firefox. As a result, our solution offers superior protec-

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 35 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Enforcing Unique Code Target Property for Control-Flow Integrity 引用了 A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary Level
  • Enforcing Unique Code Target Property for Control-Flow Integrity 引用了 Poking Holes in Information Hiding
  • Enforcing Unique Code Target Property for Control-Flow Integrity 引用了 Undermining Information Hiding (and What to Do about It)
  • Regression Greybox Fuzzing 引用了 Directed Greybox Fuzzing
  • Poking Holes in Information Hiding 引用了 Undermining Information Hiding (and What to Do about It)
  • Undermining Information Hiding (and What to Do about It) 引用了 Poking Holes in Information Hiding
  • HexType: Efficient Detection of Type Confusion Errors for C++ 引用了 A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary Level
  • HexType: Efficient Detection of Type Confusion Errors for C++ 引用了 VTrust: Regaining Trust on Virtual Calls
  • SoK: Sanitizing for Security 引用了 HexType: Efficient Detection of Type Confusion Errors for C++
  • SoK: Sanitizing for Security 引用了 Directed Greybox Fuzzing
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper35

  1. Directed Greybox FuzzingMarcel Böhme, Van-Thuan Pham, Manh-Dung Nguyen, Abhik RoychoudhuryCCS 2017 · 836 次引用
  2. SoK: Sanitizing for SecurityDokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na 等S&P 2019 · 196 次引用
  3. Enforcing Unique Code Target Property for Control-Flow IntegrityHong Hu, Chenxiong Qian, Carter Yagemann, Simon Pak Ho Chung 等CCS 2018 · 142 次引用
  4. Regression Greybox FuzzingXiaogang Zhu, Marcel BöhmeCCS 2021 · 84 次引用
  5. HexType: Efficient Detection of Type Confusion Errors for C++Yuseok Jeon, Priyam Biswas, Scott A. Carr, Byoungyoung Lee 等CCS 2017 · 67 次引用

它引用的 Paper5

  1. A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary LevelVictor van der Veen, Enes Göktas, Moritz Contag, Andre Pawlowski 等S&P 2016 · 227 次引用
  2. Poking Holes in Information HidingAngelos Oikonomopoulos, Elias Athanasopoulos, Herbert Bos, Cristiano GiuffridaUSENIX Security 2016 · 92 次引用
  3. VTrust: Regaining Trust on Virtual CallsChao Zhang, Dawn Song, Scott A. Carr, Mathias Payer 等NDSS 2016 · 91 次引用
  4. Undermining Information Hiding (and What to Do about It)Enes Göktas, Robert Gawlik, Benjamin Kollenda, Elias Athanasopoulos 等USENIX Security 2016 · 82 次引用
  5. Protecting C++ Dynamic Dispatch Through VTable InterleavingDimitar Bounov, Rami Gökhan Kici, Sorin LernerNDSS 2016 · 77 次引用

相关 Paper

  1. type++: Prohibiting Type Confusion with Inline Type InformationNicolas Badoux, Flavio Toffalini, Yuseok Jeon, Mathias PayerNDSS 2025
  2. 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 次引用
  3. Uncontained: Uncovering Container Confusion in the Linux KernelJakob Koschel, Pietro Borrello, Daniele Cono D'Elia, Herbert Bos 等USENIX Security 2023
  4. BSan: A Powerful Identifier-Based Hardware-Independent Memory Error Detector for COTS BinariesWen Zhang, Botang Xiao, Qingchen Kong, Le Guan 等ICSE 2025
  5. Rusted Types: Static Detection of Rust Type Confusion BugsZeyang Zhuang, Wei Meng, Michael R. LyuICSE 2026
黄昏的海面,两侧是细线勾勒的悬崖