Lune

CCS2022Top-tier venue

Non-Distinguishable Inconsistencies as a Deterministic Oracle for Detecting Security Bugs

Qingyang Zhou, Qiushi Wu, Dinghao Liu, Shouling Ji, Kangjie Lu

Abstract

Security bugs like memory errors are constantly introduced to software programs, and recent years have witnessed an increasing number of reported security bugs. Traditional detection approaches are mainly specification-based-detecting violations against a specified rule as security bugs. This often does not work well in practice because specifications are difficult to specify and generalize, leaving complicated and new types of bugs undetected. Recent research thus leans toward deviation-based detection which finds a substantial number of similar cases and detects deviating cases as potential bugs. This, however, suffers from two other problems. First, it requires enough similar cases to find deviations and thus cannot work for custom code that does not have similar cases. Second, code-similarity analysis is probabilistic and challenging, so the detection can be unreliable. Sometimes, similar cases can normally have deviating behaviors under different contexts. In this paper, we propose a novel approach for detecting security bugs based on a new concept called Non-Distinguishable Inconsistencies (NDI). The insight is that if two code paths in a function exhibit inconsistent security states (such as being freed or initialized) that are non-distinguishable from the external, such as the callers, there is no way to recover from the inconsistency from the external, which results in a bug. Such an approach has several strengths. First, it is specification-free and thus can support complicated and new types of bugs. Second, it does not require similar cases and by its nature is deterministic. Third, the analysis is practical by minimizing complicated and lengthy data-flow analysis. We implemented NDI and applied it to well-tested programs, including the OpenSSL library, the FreeBSD kernel, the Apache httpd server, and the PHP interpreter. The results show that NDI works for both large and small programs, and it effectively found 51 new bugs, most of which are otherwise missed by the state-of-the-art detection tools.

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.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Place Your Locks Well: Understanding and Detecting Lock Misuse Bugs cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
  • One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery cites Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention Inferences
  • One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery cites APISan: Sanitizing API Usages through Semantic Cross-Checking
  • One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discovery 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 Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
  • SYSYPHUZZ: the Pressure of More Coverage cites Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention Inferences
  • Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention Inferences cites APISan: Sanitizing API Usages through Semantic Cross-Checking
  • Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention Inferences cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. Improving Indirect-Call Analysis in LLVM with Type and Data-Flow Co-AnalysisDinghao Liu, Shouling Ji, Kangjie Lu, Qinming HeUSENIX Security 2024 · 13 citations
  2. Detecting Kernel Memory Bugs through Inconsistent Memory Management Intention InferencesDinghao Liu, Zhipeng Lu, Shouling Ji, Kangjie Lu et al.USENIX Security 2024 · 6 citations
  3. One Bug, Hundreds Behind: LLMs for Large-Scale Bug DiscoveryQiushi Wu, Yue Xiao, Dhilung Kirat, Kevin Eykholt et al.ICML 2026 · 5 citations
  4. SYSYPHUZZ: the Pressure of More CoverageZezhong Ren, Han Zheng, Zhiyao Feng, Qinying Wang et al.NDSS 2026 · 1 citation
  5. Place Your Locks Well: Understanding and Detecting Lock Misuse BugsYuandao Cai, Peisen Yao, Chengfeng Ye, Charles ZhangUSENIX Security 2023

Builds on17

  1. Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity DetectionXiaojun Xu, Chang Liu, Qian Feng, Heng Yin et al.CCS 2017 · 682 citations
  2. Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity DetectionZeping Yu, Rui Cao, Qiyi Tang, Sen Nie et al.AAAI 2020 · 265 citations
  3. APISan: Sanitizing API Usages through Semantic Cross-CheckingInsu Yun, Changwoo Min, Xujie Si, Yeongjin Jang et al.USENIX Security 2016 · 107 citations
  4. Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
  5. PtrSplit: Supporting General Pointers in Automatic Program PartitioningShen Liu, Gang Tan, Trent JaegerCCS 2017 · 83 citations

Related papers

  1. 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
  2. Detecting API Post-Handling Bugs Using Code and Description in PatchesMiaoqian Lin, Kai Chen, Yang XiaoUSENIX Security 2023
  3. Finding Bugs Using Your Own Code: Detecting Functionally-similar yet Inconsistent CodeMansour Ahmadi, Reza Mirzazade Farkhani, Ryan Williams, Long LuUSENIX Security 2021 · 41 citations
  4. Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
  5. UAFSan: an object-identifier-based dynamic approach for detecting use-after-free vulnerabilitiesBinfa Gui, Wei Song, Jeff HuangISSTA 2021 · 9 citations
Dusk over the sea between two cliffs drawn in fine vertical lines