USENIX Security2021Top-tier venue
Understanding and Detecting Disordered Error Handling with Precise Function Pairing
Qiushi Wu, Aditya Pakki, Navid Emamdoost, Stephen McCamant, Kangjie Lu
Abstract
Software programs may frequently encounter various errors such as allocation failures. Error handling aims to gracefully deal with the errors to avoid security and reliability issues, thus it is prevalent and vital. However, because of its complexity and corner cases, error handling itself is often erroneous, and prior research has primarily focused on finding bugs in the handling part, such as incorrect error-code returning or missing error propagation. In this paper, we propose and investigate a class of bugs in error-handling code from a different perspective. In particular, we find that programs often perform "cleanup" operations before the actual error handling, such as freeing memory or decreasing refcount. Critical bugs occur when these operations are performed (1) in an incorrect order, (2) redundantly, or (3) inadequately. We refer to such bugs as Disordered Error Handling (DiEH). Our investigation reveals that DiEH bugs are not only common but can also cause security problems such as privilege escalation, memory corruption, and denial-of-service. Based on the findings from the investigation, we then develop a system, HERO (Handling ERrors Orderly), to automatically detect DiEH. The core of HERO is a novel technique that precisely pairs both common and custom functions based on the unique error-handling structures, which allows us to infer expected cleanup functions. With HERO, we found 239 DiEH bugs in the Linux kernel, the FreeBSD kernel, and OpenSSL, which can cause security and reliability issues. The evaluation results show that DiEH is critical and widely exists in system software, and HERO is effective in detecting DiEH. We also believe that the precise function pairing is of independent interest in other research areas such as temporal-rule inference and race detection.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
24 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis cites APISan: Sanitizing API Usages through Semantic Cross-Checking
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- Saturn: Host-Gadget Synergistic USB Driver Fuzzing cites PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary
- Saturn: Host-Gadget Synergistic USB Driver Fuzzing cites PrIntFuzz: fuzzing Linux drivers via automated virtual device simulation
- Saturn: Host-Gadget Synergistic USB Driver Fuzzing cites DIFUZE: Interface Aware Fuzzing for Kernel Drivers
- PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary cites DIFUZE: Interface Aware Fuzzing for Kernel Drivers
- PrIntFuzz: fuzzing Linux drivers via automated virtual device simulation cites PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary
- PrIntFuzz: fuzzing Linux drivers via automated virtual device simulation cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- PrIntFuzz: fuzzing Linux drivers via automated virtual device simulation cites DIFUZE: Interface Aware Fuzzing for Kernel Drivers
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-Analysis cites Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-Analysis cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-Analysis cites Detecting Missed Security Operations Through Differential Checking of Object-based Similar Paths
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-Analysis cites Goshawk: Hunting Memory Corruptions via Structure-Aware and Object-Centric Memory Operation Synopsis
- Detecting Missed Security Operations Through Differential Checking of Object-based Similar Paths cites PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary
- Detecting Missed Security Operations Through Differential Checking of Object-based Similar Paths cites APISan: Sanitizing API Usages through Semantic Cross-Checking
- Detecting Missed Security Operations Through Differential Checking of Object-based Similar Paths cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- Detecting Missed Security Operations Through Differential Checking of Object-based Similar Paths cites DIFUZE: Interface Aware Fuzzing for Kernel Drivers
Cited by top-tier papers24
- Goshawk: Hunting Memory Corruptions via Structure-Aware and Object-Centric Memory Operation SynopsisYunlong Lyu, Yi Fang, Yiwei Zhang, Qibin Sun et al.S&P 2022 · 26 citations
- PrIntFuzz: fuzzing Linux drivers via automated virtual device simulationZheyu Ma, Bodong Zhao, Letu Ren, Zheming Li et al.ISSTA 2022 · 23 citations
- Saturn: Host-Gadget Synergistic USB Driver FuzzingYiru Xu, Hao Sun, Jianzhong Liu, Yuheng Shen et al.S&P 2024 · 13 citations
- Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-AnalysisDinghao Liu, Shouling Ji, Kangjie Lu, Qinming HeUSENIX Security 2024 · 13 citations
- Detecting Missed Security Operations Through Differential Checking of Object-based Similar PathsDinghao Liu, Qiushi Wu, Shouling Ji, Kangjie Lu et al.CCS 2021 · 11 citations
Builds on9
- DIFUZE: Interface Aware Fuzzing for Kernel DriversJake Corina, Aravind Machiry, Christopher Salls, Yan Shoshitaishvili et al.CCS 2017 · 195 citations
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 citations
- PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS BoundaryDokyung Song, Felicitas Hetzelt, Dipanjan Das, Chad Spensky et al.NDSS 2019 · 114 citations
- APISan: Sanitizing API Usages through Semantic Cross-CheckingInsu Yun, Changwoo Min, Xujie Si, Yeongjin Jang et al.USENIX Security 2016 · 107 citations
- Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
Related papers
- Exaggerated Error Handling Hurts! An In-Depth Study and Context-Aware DetectionAditya Pakki, Kangjie LuCCS 2020 · 17 citations
- Error Delayed Is Not Error Handled: Understanding and Fixing Propagated Error-Handling BugsHaoran Liu, Shan-shan Li, Zhouyang Jia, Yuanliang Zhang et al.FSE 2025
- Cut to the Chase: An Error-Oriented Approach to Detect Error-Handling BugsHaoran Liu, Zhouyang Jia, Shanshan Li, Yan Lei et al.FSE 2024 · 1 citation
- Detecting API Post-Handling Bugs Using Code and Description in PatchesMiaoqian Lin, Kai Chen, Yang XiaoUSENIX Security 2023
- Automatically Detecting Error Handling Bugs Using Error SpecificationsSuman Jana, Yuan Jochen Kang, Samuel Roth, Baishakhi RayUSENIX Security 2016 · 79 citations
