Lune

S&P2023顶会

When Top-down Meets Bottom-up: Detecting and Exploiting Use-After-Cleanup Bugs in Linux Kernel

Lin Ma, Duoming Zhou, Hanjie Wu, Yajin Zhou, Rui Chang, Hao Xiong, Lei Wu, Kui Ren

摘要

When a device is detached from the system, Use-After-Cleanup (UAC) bugs can occur because a running kernel thread may be unaware of the device detachment and attempt to use an object that has been released by the cleanup thread. Our investigation suggests that an attacker can exploit the UAC bugs to obtain the capability of arbitrary code execution and privilege escalation, which receives little attention from the community. While existing tools mainly focus on well-known concurrency bugs like data race, few target UAC bugs.In this paper, we propose a tool named UACatcher to systematically detect UAC bugs. UACatcher consists of three main phases. It first scans the entire kernel to find target layers. Next, it adopts the context- and flow-sensitive inter-procedural analysis and the points-to analysis to locate possible free (deallocation) sites in the bottom-up cleanup thread and use (dereference) sites in the top-down kernel thread that can cause UAC bugs. Then, UACatcher uses the routine switch point algorithm which counts on the synchronizations and path constraints to detect UAC bugs among these sites and estimate exploitable ones. For exploitable bugs, we leverage the pseudoterminal-based device emulation technique to develop practical exploits.We have implemented a prototype of UACatcher and evaluated it on 5.11 Linux kernel. As a result, our tool successfully detected 346 UAC bugs, which were reported to the community (277 have been confirmed and fixed and 15 CVEs have been assigned). Additionally, 13 bugs are exploitable, which can be used to develop working exploits that gain the arbitrary code execution primitive in kernel space and achieve the privilege escalation. Finally, we discuss UACatcher’s limitations and propose possible solutions to fix and prevent UAC bugs.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation
  • Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels
  • MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation 引用了 kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels
  • MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation 引用了 IMF: Inferred Model-based Fuzzer
  • Statically Discover Cross-Entry Use-After-Free Vulnerabilities in the Linux Kernel 引用了 Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis
  • Razzer: Finding Kernel Race Bugs through Fuzzing 引用了 IMF: Inferred Model-based Fuzzer
  • SyzParam: Incorporating Runtime Parameters into Kernel Driver Fuzzing 引用了 Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis
  • SyzParam: Incorporating Runtime Parameters into Kernel Driver Fuzzing 引用了 MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation
  • SyzParam: Incorporating Runtime Parameters into Kernel Driver Fuzzing 引用了 Razzer: Finding Kernel Race Bugs through Fuzzing
  • SyzParam: Incorporating Runtime Parameters into Kernel Driver Fuzzing 引用了 kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. Statically Discover Cross-Entry Use-After-Free Vulnerabilities in the Linux KernelHang Zhang, Jangha Kim, Chuhong Yuan, Zhiyun Qian 等NDSS 2025
  2. SyzParam: Incorporating Runtime Parameters into Kernel Driver FuzzingYue Sun, Yan Kang, Chenggang Wu, Kangjie Lu 等CCS 2025

它引用的 Paper17

  1. kAFL: Hardware-Assisted Feedback Fuzzing for OS KernelsSergej Schumilo, Cornelius Aschermann, Robert Gawlik, Sebastian Schinzel 等USENIX Security 2017 · 324 次引用
  2. Razzer: Finding Kernel Race Bugs through FuzzingDae R. Jeong, Kyungtae Kim, Basavesh Shivakumar, Byoungyoung Lee 等S&P 2019 · 202 次引用
  3. MoonShine: Optimizing OS Fuzzer Seed Selection with Trace DistillationShankara Pailoor, Andrew Aday, Suman JanaUSENIX Security 2018 · 180 次引用
  4. Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 次引用
  5. IMF: Inferred Model-based FuzzerHyungSeok Han, Sang Kil ChaCCS 2017 · 139 次引用

相关 Paper

  1. DDRace: Finding Concurrency UAF Vulnerabilities in Linux Drivers with Directed FuzzingMing Yuan, Bodong Zhao, Penghui Li, Jiashuo Liang 等USENIX Security 2023
  2. UBITect: a precise and scalable method to detect use-before-initialization bugs in Linux kernelYizhuo Zhai, Yu Hao, Hang Zhang, Daimeng Wang 等FSE 2020 · 34 次引用
  3. ExpRace: Exploiting Kernel Races through Raising InterruptsYoochan Lee, Changwoo Min, Byoungyoung LeeUSENIX Security 2021 · 40 次引用
  4. Precise Detection of Kernel Data Races with Probabilistic Lockset AnalysisGabriel Ryan, Abhishek Shah, Dongdong She, Suman JanaS&P 2023
  5. Progressive Scrutiny: Incremental Detection of UBI bugs in the Linux KernelYizhuo Zhai, Yu Hao, Zheng Zhang, Weiteng Chen 等NDSS 2022
黄昏的海面,两侧是细线勾勒的悬崖