[论文解读] MUZZ: Thread-aware Grey-box Fuzzing for Effective Bug Hunting in Multithreaded Programs
Muzz 是一种线程感知的灰盒模糊测试工具,通过三种新型插桩技术——面向覆盖的插桩、线程上下文插桩和调度干预插桩——增强传统模糊测试在多线程程序中的效果,这些技术可生成运行时反馈,以指导种子选择和执行策略。Muzz 在检测并发漏洞和发现并发错误方面优于 AFL,在 12 个真实世界程序中发现了 8 个新漏洞和 19 个新错误,其中 4 个获得了 CVE 编号。
Grey-box fuzz testing has revealed thousands of vulnerabilities in real-world software owing to its lightweight instrumentation, fast coverage feedback, and dynamic adjusting strategies. However, directly applying grey-box fuzzing to input-dependent multithreaded programs can be extremely inefficient. In practice, multithreading-relevant bugs are usually buried in sophisticated program flows. Meanwhile, the existing grey-box fuzzing techniques do not stress thread-interleavings which affect execution states in multithreaded programs. Therefore, mainstream grey-box fuzzers cannot effectively test problematic segments in multithreaded programs despite they might obtain high code coverage statistics. To this end, we propose MUZZ, a new grey-box fuzzing technique that hunts for bugs in multithreaded programs. MUZZ owns three novel thread-aware instrumentations, namely coverage-oriented instrumentation, thread-context instrumentation, and schedule-intervention instrumentation. During fuzzing, these instrumentations engender runtime feedback to stress execution states caused by thread interleavings. By leveraging the feedback in the dynamic seed selection and execution strategies, MUZZ preserves more valuable seeds that expose bugs in a multithreading context. We evaluate MUZZ on 12 real-world software programs. Experiments show that MUZZ outperforms AFL in both multithreading-relevant seed generation and concurrency-vulnerability detection. Further, by replaying the target programs against the generated seeds, MUZZ also reveals more concurrency-bugs (e.g., data-races, thread-leaks) than AFL. In total, MUZZ detected 8 new concurrency-vulnerabilities and 19 new concurrency-bugs. At the time of writing, 4 CVE IDs have been assigned to the reported issues.
研究动机与目标
- 解决主流灰盒模糊测试工具在测试输入依赖的多线程程序时效率低下的问题,因其对线程交错执行缺乏感知。
- 克服现有模糊测试工具无法有效触发复杂线程调度所导致的执行状态,从而遗漏并发漏洞和错误的局限性。
- 开发一种模糊测试工具,通过利用线程感知插桩的运行时反馈,生成专门针对多线程相关路径的种子。
- 提升多线程相关种子的生成质量,并增强在真实世界多线程软件中检测并发漏洞和错误的能力。
- 与现有的动态并发错误检测工具(如 TSan)集成,以重放生成的种子,揭示此前未被检测到的并发问题。
提出的方法
- 引入面向覆盖的插桩,以追踪代码覆盖率,同时区分受线程交错影响的执行状态。
- 实现线程上下文插桩,以监控和记录执行过程中线程的状态,从而识别由交错引发的特定行为。
- 应用调度干预插桩,在模糊测试过程中主动多样化线程调度,提高触发罕见或复杂交错的可能性。
- 利用三种插桩技术生成的反馈,指导动态种子选择,优先选择探索多线程相关路径的种子。
- 基于线程感知的反馈优化执行策略,以增强对并发敏感代码区域的探索能力。
- 与现有的动态并发错误检测工具(如 TSan)集成,以重放生成的种子并检测数据竞争、死锁等并发错误。
实验结果
研究问题
- RQ1与传统方法相比,线程感知插桩是否能提升灰盒模糊测试在多线程程序中的有效性?
- RQ2对线程交错敏感的插桩反馈在多大程度上能改善模糊测试中的种子选择与执行策略?
- RQ3Muzz 在真实世界多线程软件中是否能比 AFL 及其他最先进的模糊测试工具发现更多并发漏洞和错误?
- RQ4当与 TSan 等动态分析工具结合时,Muzz 在揭示此前未被检测到的并发漏洞和错误方面有多高效?
- RQ5调度干预插桩是否能显著增加模糊测试过程中探索的线程交错多样性,从而实现对多线程相关路径更全面的覆盖?
主要发现
- Muzz 在生成多线程相关种子方面优于 AFL,展现出在针对由线程交错引发的复杂执行状态进行目标定位方面的卓越效果。
- Muzz 在真实世界多线程程序中检测到 8 个新的并发漏洞,其中 4 个已获得 CVE 编号。
- 通过使用 TSan 重放生成的种子,Muzz 揭示了 19 个新的并发错误,包括数据竞争和线程泄漏,这些错误在 AFL 中未被检测到。
- 面向覆盖、线程上下文和调度干预三种插桩技术的集成显著提升了反馈质量,并引导了更高效的模糊测试探索。
- 在 12 个真实世界程序上的实验表明,Muzz 在多线程相关路径上的代码覆盖率更高,并且比 AFL 和 MOpt 检测到更多的并发问题。
- Muzz 中基于反馈的种子选择与执行策略能有效保留并优先处理在复杂线程交错条件下暴露错误的种子。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。