Lune

FSE2024顶会

Fast Graph Simplification for Path-Sensitive Typestate Analysis through Tempo-Spatial Multi-Point Slicing

Xiao Cheng, Jiawei Ren, Yulei Sui

摘要

Typestate analysis is a commonly used static technique to identify software vulnerabilities by assessing if a sequence of operations violates temporal safety specifications defined by a finite state automaton. Pathsensitive typestate analysis (PSTA) offers a more precise solution by eliminating false alarms stemming from infeasible paths. To improve the efficiency of path-sensitive analysis, previous efforts have incorporated sparse techniques, with a focus on analyzing the path feasibility of def-use chains. However, they cannot be directly applied to detect typestate vulnerabilities requiring temporal information within the control flow graph like use-to-use information.

In this paper, we introduce FGS, a Fast Graph Simplification approach designed for PSTA by retaining multi-point temporal information while harnessing the advantages of sparse analysis. We propose a new multi-point slicing technique that captures the temporal and spatial correlations within the program. By doing so, it optimizes the program by only preserving the necessary program dependencies, resulting in a sparser structure for precision-preserving PSTA. Our graph simplification approach, as a fast preprocessing step, offers several benefits for existing PSTA algorithms. These include a more concise yet precision-preserving graph structure, decreased numbers of variables and constraints within execution states, and simplified path feasibility checking. As a result, the overall efficiency of the PSTA algorithm exhibits significant improvement.

We evaluated FGS using NIST benchmarks and ten real-world large-scale projects to detect four types of vulnerabilities, including memory leaks, double-frees, use-after-frees, and null dereferences. On average, when comparing FGS against ESP (baseline PSTA), FGS reduces 89% of nodes, 86% of edges, and 88% of calling context of the input graphs, obtaining a speedup of 116× and a memory usage reduction of 93% on the large projects evaluated. Our experimental results also demonstrate that FGS outperforms six open-source tools (IKOS, ClangSA, Saber, Cppcheck, Infer, and Sparrow) on the NIST benchmarks, which comprises 846 programs. Specifically, FGS achieves significantly higher precision, with improvements of up to 171% (42% on average), and detects a greater number of true positives, with enhancements of up to 245% (52% on average). Moreover, among the ten large-scale projects, FGS successfully found 105 real bugs with a precision rate of 82%. In contrast, our baseline tools not only missed over 42% of the real bugs but also yielded an average precision rate of just 13%.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Type-Alias Analysis: Enabling LLVM IR with Accurate Types 引用了 Flow2Vec: value-flow-based precise code embedding
  • Path-sensitive code embedding via contrastive learning for software vulnerability detection 引用了 Flow2Vec: value-flow-based precise code embedding
  • Path-sensitive code embedding via contrastive learning for software vulnerability detection 引用了 Path-sensitive sparse analysis without path conditions
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Type-Alias Analysis: Enabling LLVM IR with Accurate TypesJinmeng Zhou, Ziyue Pan, Wenbo Shen, Xingkai Wang 等ISSTA 2025 · 1 次引用
  2. TLR: Codebase-Level C Memory Management Error Repair with Large Language ModelsXiao Cheng, Zhihao Guo, Huan Huo, Yulei SuiFSE 2026 · 1 次引用
  3. A Sound Static Analysis Approach to I/O API MigrationShangyu Li, Zhaoyang Zhang, Sizhe Zhong, Diyu Zhou 等OOPSLA 2025
  4. Protecting Source Code Privacy When Hunting Memory BugsJielun Wu, Bing Shui, Hongcheng Fan, Shengxin Wu 等ASE 2025
  5. Multi-stage On-Demand Program Slicing for Modular Analysis of Multi-threaded ProgramsJiawei Yang, Xiao Cheng, Jiawei Wang, Xiapu Luo 等ISSTA 2026

它引用的 Paper11

  1. Typestate-guided fuzzer for discovering use-after-free vulnerabilitiesHaijun Wang, Xiaofei Xie, Yi Li, Cheng Wen 等ICSE 2020 · 107 次引用
  2. Path-sensitive code embedding via contrastive learning for software vulnerability detectionXiao Cheng, Guanqin Zhang, Haoyu Wang, Yulei SuiISSTA 2022 · 98 次引用
  3. Flow2Vec: value-flow-based precise code embeddingYulei Sui, Xiao Cheng, Guanqin Zhang, Haoyu WangOOPSLA 2020 · 94 次引用
  4. Fast graph simplification for interleaved Dyck-reachabilityYuanbo Li, Qirun Zhang, Thomas W. RepsPLDI 2020 · 30 次引用
  5. Path-sensitive sparse analysis without path conditionsQingkai Shi, Peisen Yao, Rongxin Wu, Charles ZhangPLDI 2021 · 24 次引用

相关 Paper

  1. Path-sensitive and alias-aware typestate analysis for detecting OS bugsTuo Li, Jia-Ju Bai, Yulei Sui, Shi-Min HuASPLOS 2022 · 16 次引用
  2. Precise Sparse Abstract Execution via Cross-Domain InteractionXiao Cheng, Jiawei Wang, Yulei SuiICSE 2024 · 6 次引用
  3. Efficient Strong Updates For Path Sensitive Data Dependence AnalysisYiyuan Guo, Charles ZhangICSE 2026
  4. Hermes: Making Path-Sensitive Pointer Analysis Scalable for Sparse Value-Flow AnalysisYuxuan He, Ruilin Jiang, He Zhang, Qingkai Shi 等OOPSLA 2026
  5. Unleashing the Power of Type-Based Call Graph Construction by Using Regional Pointer InformationYuandao Cai, Yibo Jin, Charles ZhangUSENIX Security 2024 · 16 次引用
黄昏的海面,两侧是细线勾勒的悬崖