USENIX Security2024Top-tier venue
What IF Is Not Enough? Fixing Null Pointer Dereference With Contextual Check
Yunlong Xing, Shu Wang, Shiyu Sun, Xu He, Kun Sun, Qi Li
Abstract
Null pointer dereference (NPD) errors pose the risk of unexpected behavior and system instability, potentially leading to abrupt program termination due to exceptions or segmentation faults. When generating NPD fixes, all existing solutions are confined to the function level fixes and ignore the valuable intraprocedural and interprocedural contextual information, potentially resulting in incorrect patches. In this paper, we introduce CONCH, a novel approach that addresses the challenges of generating correct fixes for NPD issues by incorporating contextual checks. Our method first constructs an NPD context graph to maintain the semantics related to patch generation. Then we summarize distinct fixing position selection policies based on the distribution of the error positions, ensuring the resolution of bugs without introducing duplicate code. Next, the intraprocedural state retrogression builds the if condition, retrogresses the local resources, and constructs return statements as an initial patch. Finally, we conduct interprocedural state propagation to assess the correctness of the initial patch in the entire call chain. We evaluate the effectiveness of CONCH over two real-world datasets. The experimental results demonstrate that CONCH outperforms the SOTA methods and yields over 85% accurate patches.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1d8a995b-c968-4f13-ad8c-80a15d4f9c13Cited by top-tier papers5
- pPatch: Automated Vulnerability UnpatchingTianyi Jing, Pengyu Ding, Meng Xu, Yinhao Hu et al.FSE 2026
- PATCHAGENT: A Practical Program Repair Agent Mimicking Human ExpertiseZheng Yu, Ziyi Guo, Yuhang Wu, Jiahao Yu et al.USENIX Security 2025
- SoK: Automated Vulnerability Repair: Methods, Tools, and AssessmentsYiwei Hu, Zhen Li, Kedie Shu, Shenghua Guan et al.USENIX Security 2025
- LogicEval: A Systematic Framework for Evaluating Automated Repair Techniques for Logical Vulnerabilities in Real-World SoftwareSyed Md. Mukit Rashid, Abdullah Al Ishtiaq, Kai Tu, Yilu Dong et al.ACL 2026
- SoK: Towards Effective Automated Vulnerability RepairYing Li, Faysal Hossain Shezan, Bomin Wei, Gang Wang et al.USENIX Security 2025
Builds on4
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 citations
- Local Reasoning About the Presence of Bugs: Incorrectness Separation LogicAzalea Raad, Josh Berdine, Hoang-Hai Dang, Derek Dreyer et al.CAV 2020 · 70 citations
- SAVER: scalable, precise, and safe memory-error repairSeongjoon Hong, Junhee Lee, Jeongsoo Lee, Hakjoo OhICSE 2020 · 28 citations
- NPEX: Repairing Java Null Pointer Exceptions without TestsJunhee Lee, Seongjoon Hong, Hakjoo OhICSE 2022 · 13 citations
Related papers
- Detecting API Post-Handling Bugs Using Code and Description in PatchesMiaoqian Lin, Kai Chen, Yang XiaoUSENIX Security 2023
- Program vulnerability repair via inductive inferenceYuntong Zhang, Xiang Gao, Gregory J. Duck, Abhik RoychoudhuryISSTA 2022 · 29 citations
- Reorder Pointer Flow in Sound Concurrency Bug PredictionYuqi Guo, Shihao Zhu, Yan Cai, Liang He et al.ICSE 2024 · 1 citation
- Context Debloating for Object-Sensitive Pointer AnalysisDongjie He, Jingbo Lu, Jingling XueASE 2021 · 10 citations
- Rete: Learning Namespace Representation for Program RepairNikhil Parasaram, Earl T. Barr, Sergey MechtaevICSE 2023 · 12 citations
