Lune

ISSTA2022Top-tier venue

Hunting bugs with accelerated optimal graph vertex matching

Xiaohui Zhang, Yuanjun Gong, Bin Liang, Jianjun Huang, Wei You, Wenchang Shi, Jian Zhang

Abstract

Various techniques based on code similarity measurement have been proposed to detect bugs. Essentially, the code fragment can be regarded as a kind of graph. Performing code graph similarity comparison to identify the potential bugs is a natural choice. However, the logic of a bug often involves only a few statements in the code fragment, while others are bug-irrelevant. They can be considered as a kind of noise, and can heavily interfere with the code similarity measurement. In theory, performing optimal vertex matching can address the problem well, but the task is NP-complete and cannot be applied to a large-scale code base. In this paper, we propose a two-phase strategy to accelerate code graph vertex matching for detecting bugs. In the first phase, a vertex matching embedding model is trained and used to rapidly filter a limited number of candidate code graphs from the target code base, which are likely to have a high vertex matching degree with the seed, i.e., the known buggy code. As a result, the number of code graphs needed to be further analyzed is dramatically reduced. In the second phase, a high-order similarity embedding model based on graph convolutional neural network is built to efficiently get the approximately optimal vertex matching between the seed and candidates. On this basis, the code graph similarity is calculated to identify the potential buggy code. The proposed method is applied to five open source projects. In total, 31 unknown bugs were successfully detected and confirmed by developers. Comparative experiments demonstrate that our method can effectively mitigate the noise problem, and the detection efficiency can be improved dozens of times with the two-phase strategy.

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.

2 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

  • BinAug: Enhancing Binary Similarity Analysis with Low-Cost Input Repairing cites Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
  • BinAug: Enhancing Binary Similarity Analysis with Low-Cost Input Repairing cites Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
  • BinAug: Enhancing Binary Similarity Analysis with Low-Cost Input Repairing cites Scalable Graph-based Bug Search for Firmware Images
  • Feature Slice Matching for Precise Bug Detection cites discovRE: Efficient Cross-Architecture Identification of Bugs in Binary Code
  • Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection cites discovRE: Efficient Cross-Architecture Identification of Bugs in Binary Code
  • Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection cites Scalable Graph-based Bug Search for Firmware Images
  • Scalable Graph-based Bug Search for Firmware Images cites discovRE: Efficient Cross-Architecture Identification of Bugs in Binary Code
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. BinAug: Enhancing Binary Similarity Analysis with Low-Cost Input RepairingWai Kin Wong, Huaijin Wang, Zongjie Li, Shuai WangICSE 2024 · 4 citations
  2. Feature Slice Matching for Precise Bug DetectionKe Ma, Jianjun Huang, Wei You, Bin Liang et al.FSE 2026

Builds on6

  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. Scalable Graph-based Bug Search for Firmware ImagesQian Feng, Rundong Zhou, Chengcheng Xu, Yao Cheng et al.CCS 2016 · 456 citations
  3. discovRE: Efficient Cross-Architecture Identification of Bugs in Binary CodeSebastian Eschweiler, Khaled Yakdan, Elmar Gerhards-PadillaNDSS 2016 · 342 citations
  4. Learning Combinatorial Embedding Networks for Deep Graph MatchingRunzhong Wang, Junchi Yan, Xiaokang YangICCV 2019 · 268 citations
  5. Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity DetectionZeping Yu, Rui Cao, Qiyi Tang, Sen Nie et al.AAAI 2020 · 265 citations

Related papers

  1. CCGraph: a PDG-based code clone detector with approximate graph matchingYue Zou, Bihuan Ban, Yinxing Xue, Yun XuASE 2020 · 46 citations
  2. Path-sensitive code embedding via contrastive learning for software vulnerability detectionXiao Cheng, Guanqin Zhang, Haoyu Wang, Yulei SuiISSTA 2022 · 98 citations
  3. GraphSPD: Graph-Based Security Patch Detection with Enriched Code SemanticsShu Wang, Xinda Wang, Kun Sun, Sushil Jajodia et al.S&P 2023
  4. Detecting Condition-Related Bugs with Control Flow Graph Neural NetworkJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun et al.ISSTA 2023 · 19 citations
  5. Learning semantic program embeddings with graph interval neural networkYu Wang, Ke Wang, Fengjuan Gao, Linzhang WangOOPSLA 2020 · 61 citations
Dusk over the sea between two cliffs drawn in fine vertical lines