TCP-Fuzz: Detecting Memory and Semantic Bugs in TCP Stacks with Fuzzing
Yonghao Zou, Jia-Ju Bai, Jielong Zhou, Jianfeng Tan, Chenggang Qin, Shi-Min Hu
Abstract
TCP stacks provide reliable data transmission in network, and thus they should be correctly implemented and well tested to ensure reliability and security. However, testing TCP stacks is difficult. First, a TCP stack accepts packets and system calls that have dependencies between each other, and thus generating effective test cases is challenging. Second, a TCP stack has various complex state transitions, but existing testing approaches target covering states instead of covering state transitions, and thus their testing coverage is limited. Finally, our study of TCP stack commits shows that 87% of bug-fixing commits are related to semantic bugs (such as RFC violations), but existing bug sanitizers can detect only memory bugs not semantic bugs.
In this paper, we design a novel fuzzing framework named TCP-Fuzz, to effectively test TCP stacks and detect bugs. TCP-Fuzz consists of three key techniques: (1) a dependencybased strategy that considers dependencies between packets and system calls, to generate effective test cases; (2) a transition-guided fuzzing approach that uses a new coverage metric named branch transition as program feedback, to improve the coverage of state transitions; (3) a differential checker that compares the outputs of multiple TCP stacks for the same inputs, to detect semantic bugs. We have evaluated TCP-Fuzz on five widely-used TCP stacks (TLDK, F-Stack, mTCP, FreeBSD TCP and Linux TCP), and find 56 real bugs (including 8 memory bugs and 48 semantic bugs). 40 of these bugs have been confirmed by related developers.
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.
Cited by top-tier papers20
- NNSmith: Generating Diverse and Valid Test Cases for Deep Learning CompilersJiawei Liu, Jinkun Lin, Fabian Ruffy, Cheng Tan et al.ASPLOS 2023 · 90 citations
- Understanding the Micro-Behaviors of Hardware Offloaded Network Stacks with LuminaZhuolong Yu, Bowen Su, Wei Bai, Shachar Raindel et al.SIGCOMM 2023 · 11 citations
- Break the Wall from Bottom: Automated Discovery of Protocol-Level Evasion Vulnerabilities in Web Application FirewallsQi Wang, Jianjun Chen, Zheyu Jiang, Run Guo et al.S&P 2024 · 11 citations
- Systematically Detecting Packet Validation Vulnerabilities in Embedded Network StacksPaschal C. Amusuo, Ricardo Andrés Calvo Méndez, Zhongwei Xu, Aravind Machiry et al.ASE 2023 · 9 citations
- ParDiff: Practical Static Differential Analysis of Network Protocol ParsersMingwei Zheng, Qingkai Shi, Xuwei Liu, Xiangzhe Xu et al.OOPSLA 2024 · 9 citations
Builds on11
- Razzer: Finding Kernel Race Bugs through FuzzingDae R. Jeong, Kyungtae Kim, Basavesh Shivakumar, Byoungyoung Lee et al.S&P 2019 · 202 citations
- Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 citations
- Systematic Fuzzing and Testing of TLS LibrariesJuraj SomorovskyCCS 2016 · 136 citations
- Fuzzing File Systems via Two-Dimensional Input Space ExplorationWen Xu, Hyungon Moon, Sanidhya Kashyap, Po-Ning Tseng et al.S&P 2019 · 117 citations
- Off-Path TCP Exploits: Global Rate Limit Considered DangerousYue Cao, Zhiyun Qian, Zhongjie Wang, Tuan Dao et al.USENIX Security 2016 · 74 citations
Related papers
- T-Fuzz: Fuzzing by Program TransformationHui Peng, Yan Shoshitaishvili, Mathias PayerS&P 2018 · 326 citations
- USBFuzz: A Framework for Fuzzing USB Drivers by Device EmulationHui Peng, Mathias PayerUSENIX Security 2020
- Automated Attack Discovery in TCP Congestion Control Using a Model-guided ApproachSamuel Jero, Md. Endadul Hoque, David R. Choffnes, Alan Mislove et al.NDSS 2018 · 46 citations
- Intender: Fuzzing Intent-Based Networking with Intent-State Transition GuidanceJiwon Kim, Benjamin E. Ujcich, Dave TianUSENIX Security 2023
- SADT: Syntax-Aware Differential Testing of Certificate Validation in SSL/TLS ImplementationsLili Quan, Qianyu Guo, Hongxu Chen, Xiaofei Xie et al.ASE 2020 · 10 citations
