一句话:提出 UFO,通过扩展最大线程因果模型与约束求解,从单次轨迹精确预测并发 UAF,无假阳性且可扩展。
释放后使用(UAF)漏洞源于程序操作悬空指针,可被利用破坏关键软件系统,但在并发程序中因仅在罕见线程调度下出现而极难检测。本文提出 UFO,一种基于单次已观测执行轨迹精确预测 UAF 的新技术。其核心是扩展的最大线程因果模型,能够刻画由给定多线程执行轨迹推断出的最大可行轨迹集合;在此基础上将 UAF 检测形式化为约束求解问题,从而探索远大于传统 happens-before 技术的线程调度空间。UFO 保证无假阳性,并具有可证明更强的检测能力。作者在 Chromium、FireFox 等真实大规模 C/C++ 程序上评估,可处理数亿事件,检测出大量真实并发 UAF。
Use-After-Free (UAF) vulnerabilities are caused by the program operating on a dangling pointer and can be exploited to compromise critical software systems. While there have been many tools to mitigate UAF vulnerabilities, UAF remains one of the most common attack vectors. UAF is particularly difficult to detect in concurrent programs, in which a UAF may only occur with rare thread schedules. In this paper, we present a novel technique, UFO, that can precisely predict UAFs based on a single observed execution trace with a provably higher detection capability than existing techniques with no false positives. The key technical advancement of UFO is an extended maximal thread causality model that captures the largest possible set of feasible traces that can be inferred from a given multithreaded execution trace. By formulating UAF detection as a constraint solving problem atop this model, we can explore a much larger thread scheduling space than classical happens-before based techniques. We have evaluated UFO on several real-world large complex C/C++ programs including Chromium and FireFox. UFO scales to real-world systems with hundreds of millions of events in their execution and has detected a large number of real concurrency UAFs.