Lune

NDSS2019顶会

CRCount: Pointer Invalidation with Reference Counting to Mitigate Use-after-free in Legacy C/C++

Jangseop Shin, Donghyun Kwon, Jiwon Seo, Yeongpil Cho, Yunheung Paek

摘要

Pointer invalidation has been a popular approach adopted in many recent studies to mitigate use-after-free errors. The approach can be divided largely into two different schemes: explicit invalidation and implicit invalidation. The former aims to eradicate the root cause of use-after-free errors by explicitly invalidating every dangling pointer. In contrast, the latter aims to prevent dangling pointers by freeing an object only if there is no pointer referring to it. A downside of the explicit scheme is that it is expensive, as it demands high-cost algorithms or a large amount of space to maintain up-to-date lists of pointer locations linking to each object. Implicit invalidation is more efficient in that even without any explicit effort, it can eliminate dangling pointers by leaving objects undeleted until all the links between the objects and their referring pointers vanish by themselves during program execution. However, such an argument only holds if the scheme knows exactly when each link is created and deleted. Reference counting is a traditional method to determine the existence of reference links between objects and pointers. Unfortunately, impeccable reference counting for legacy C/C++ code is very difficult and expensive to achieve in practice, mainly because of the type unsafe operations in the code. In this paper, we present a solution, called CRCount, to the use-after-free problem in legacy C/C++. For effective and efficient problem solving, CRCount is armed with the pointer footprinting technique that enables us to compute, with high accuracy, the reference count of every object referred to by the pointers in the legacy code. Our experiments demonstrate that CRCount mitigates the useafter-free errors with a lower performance-wise and space-wise overhead than the existing pointer invalidation solutions.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Preventing Use-After-Free Attacks with Fast Forward Allocation 引用了 MarkUs: Drop-in use-after-free prevention for low-level languages
  • Preventing Use-After-Free Attacks with Fast Forward Allocation 引用了 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • Preventing Use-After-Free Attacks with Fast Forward Allocation 引用了 FreeGuard: A Faster Secure Heap Allocator
  • MarkUs: Drop-in use-after-free prevention for low-level languages 引用了 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • MarkUs: Drop-in use-after-free prevention for low-level languages 引用了 FreeGuard: A Faster Secure Heap Allocator
  • Cornucopia: Temporal Safety for CHERI Heaps 引用了 MarkUs: Drop-in use-after-free prevention for low-level languages
  • Cornucopia: Temporal Safety for CHERI Heaps 引用了 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • Cornucopia: Temporal Safety for CHERI Heaps 引用了 FreeGuard: A Faster Secure Heap Allocator
  • PTAuth: Temporal Memory Safety via Robust Points-to Authentication 引用了 FreeGuard: A Faster Secure Heap Allocator
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper20

  1. Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth 等S&P 2020 · 71 次引用
  2. PTAuth: Temporal Memory Safety via Robust Points-to AuthenticationReza Mirzazade Farkhani, Mansour Ahmadi, Long LuUSENIX Security 2021 · 67 次引用
  3. MarkUs: Drop-in use-after-free prevention for low-level languagesSam Ainsworth, Timothy M. JonesS&P 2020 · 63 次引用
  4. Preventing Use-After-Free Attacks with Fast Forward AllocationBrian Wickman, Hong Hu, Insu Yun, Daehee Jang 等USENIX Security 2021 · 53 次引用
  5. Detecting Kernel Refcount Bugs with Two-Dimensional Consistency CheckingXin Tan, Yuan Zhang, Xiyu Yang, Kangjie Lu 等USENIX Security 2021 · 26 次引用

它引用的 Paper2

  1. Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 次引用
  2. FreeGuard: A Faster Secure Heap AllocatorSam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin 等CCS 2017 · 71 次引用

相关 Paper

  1. FreeWill: Automatically Diagnosing Use-after-free Bugs via Reference Miscounting Detection on BinariesLiang He, Hong Hu, Purui Su, Yan Cai 等USENIX Security 2022
  2. A Robust and Efficient Defense against Use-after-Free Exploits via Concurrent Pointer SweepingDaiping Liu, Mingwei Zhang, Haining WangCCS 2018 · 43 次引用
  3. CountDown: Refcount-guided Fuzzing for Exposing Temporal Memory Errors in Linux KernelShuangpeng Bai, Zhechang Zhang, Hong HuCCS 2024 · 4 次引用
  4. MineSweeper: a "clean sweep" for drop-in use-after-free preventionMárton Erdos, Sam Ainsworth, Timothy M. JonesASPLOS 2022 · 13 次引用
  5. Concurrent deferred reference counting with constant-time overheadDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2021 · 26 次引用
黄昏的海面,两侧是细线勾勒的悬崖