Lune

CCS2018顶会

Check It Again: Detecting Lacking-Recheck Bugs in OS Kernels

Wenwen Wang, Kangjie Lu, Pen-Chung Yew

摘要

Operating system kernels carry a large number of security checks to validate security-sensitive variables and operations. For example, a security check should be embedded in a code to ensure that a user-supplied pointer does not point to the kernel space. Using security-checked variables is typically safe. However, in reality, security-checked variables are often subject to modification after the check. If a recheck is lacking after a modification, security issues may arise, e.g., adversaries can control the checked variable to launch critical attacks such as out-of-bound memory access or privilege escalation. We call such cases lacking-recheck (LRC) bugs, a subclass of TOCTTOU bugs, which have not been explored yet. In this paper, we present the first in-depth study of LRC bugs and develop LRSan, a static analysis system that systematically detects LRC bugs in OS kernels. Using an inter-procedural analysis and multiple new techniques, LRSan first automatically identifies security checks, critical variables, and uses of the checked variables, and then reasons about whether a modification is present after a security check. A case in which a modification is present but a recheck is lacking is an LRC bug. We apply LRSan to the latest Linux kernel and evaluate the effectiveness of LRSan. LRSan reports thousands of potential LRC cases, and we have confirmed 19 new LRC bugs. We also discuss patching strategies of LRC bugs based on our study and bug-fixing experience.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • VUzzer: Application-aware Evolutionary Fuzzing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
  • Finding Bugs Using Your Own Code: Detecting Functionally-similar yet Inconsistent Code 引用了 Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
  • T-Fuzz: Fuzzing by Program Transformation 引用了 VUzzer: Application-aware Evolutionary Fuzzing
  • T-Fuzz: Fuzzing by Program Transformation 引用了 Coverage-based Greybox Fuzzing as Markov Chain
  • SHARD: Fine-Grained Kernel Specialization with Context-Aware Hardening 引用了 PeX: A Permission Check Analysis Framework for Linux Kernel
  • SHARD: Fine-Grained Kernel Specialization with Context-Aware Hardening 引用了 Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper28

  1. Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 次引用
  2. PeX: A Permission Check Analysis Framework for Linux KernelTong Zhang, Wenbo Shen, Dongyoon Lee, Changhee Jung 等USENIX Security 2019 · 77 次引用
  3. NtFuzz: Enabling Type-Aware Kernel Fuzzing on Windows with Static Binary AnalysisJaeseung Choi, Kangsu Kim, Daejin Lee, Sang Kil ChaS&P 2021 · 61 次引用
  4. SHARD: Fine-Grained Kernel Specialization with Context-Aware HardeningMuhammad Abubakar, Adil Ahmad, Pedro Fonseca, Dongyan XuUSENIX Security 2021 · 47 次引用
  5. Finding Bugs Using Your Own Code: Detecting Functionally-similar yet Inconsistent CodeMansour Ahmadi, Reza Mirzazade Farkhani, Ryan Williams, Long LuUSENIX Security 2021 · 41 次引用

它引用的 Paper12

  1. Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 次引用
  2. VUzzer: Application-aware Evolutionary FuzzingSanjay Rawat, Vivek Jain, Ashish Kumar, Lucian Cojocar 等NDSS 2017 · 700 次引用
  3. T-Fuzz: Fuzzing by Program TransformationHui Peng, Yan Shoshitaishvili, Mathias PayerS&P 2018 · 326 次引用
  4. Enforcing Kernel Security Invariants with Data Flow IntegrityChengyu Song, Byoungyoung Lee, Kangjie Lu, William Harris 等NDSS 2016 · 141 次引用
  5. Systematic Fuzzing and Testing of TLS LibrariesJuraj SomorovskyCCS 2016 · 136 次引用

相关 Paper

  1. Static Detection of TOCTOU Bugs Caused by Kernel RacesGui-Dong Han, Jia-Ju Bai, Qiu-Ji Chen, Jiqiang LuUSENIX Security 2026
  2. CPscan: Detecting Bugs Caused by Code Pruning in IoT KernelsLirong Fu, Shouling Ji, Kangjie Lu, Peiyu Liu 等CCS 2021 · 7 次引用
  3. DR. CHECKER: A Soundy Analysis for Linux Kernel DriversAravind Machiry, Chad Spensky, Jake Corina, Nick Stephens 等USENIX Security 2017 · 126 次引用
  4. Precise and Scalable Detection of Double-Fetch Bugs in OS KernelsMeng Xu, Chenxiong Qian, Kangjie Lu, Michael Backes 等S&P 2018 · 95 次引用
  5. Detecting Kernel Refcount Bugs with Two-Dimensional Consistency CheckingXin Tan, Yuan Zhang, Xiyu Yang, Kangjie Lu 等USENIX Security 2021 · 26 次引用
黄昏的海面,两侧是细线勾勒的悬崖