一句话:提出可交换事件概念并实现工具 ConVul,显著提升并发内存破坏漏洞的检出率。
多线程执行中的内存破坏漏洞(本文称为并发漏洞)因执行的非确定性而极难检测。现有数据竞态检测器效果不佳,因为多数数据竞态(约 90%)是无害的,而基于最大因果模型的方法依赖约束求解器预测调度,实践中会漏报。本文的洞察是:并发漏洞更关乎事件执行顺序能否在不同执行中被反转,而与对应访问是否构成数据竞态无关。作者据此定义可交换事件,识别执行顺序可能被反转的事件对,并提出检测三类主要并发漏洞的算法;为克服可交换事件的潜在不精确性,还引入验证步骤以隔离真实漏洞。作者实现工具 ConVul,在 10 个已知并发漏洞和 MySQL 数据库服务器上评估:ConVul 检出 9 个已知漏洞和 6 个 MySQL 零日漏洞(其中 4 个已被确认),而三个常用竞态检测器与一个基于最大因果模型的检测器最多只检出 16 个已知及零日漏洞中的 3 个。
Memory corruption vulnerabilities can occur in multithreaded executions, known as concurrency vulnerabilities in this paper. Due to non-deterministic multithreaded executions, they are extremely difficult to detect. Recently, researchers tried to apply data race detectors to detect concurrency vulnerabilities. Unfortunately, these detectors are ineffective on detecting concurrency vulnerabilities. For example, most (90%) of data races are benign. However, concurrency vulnerabilities are harmful and can usually be exploited to launch attacks. Techniques based on maximal causal model rely on constraints solvers to predict scheduling; they can miss concurrency vulnerabilities in practice. Our insight is, a concurrency vulnerability is more related to the orders of events that can be reversed in different executions, no matter whether the corresponding accesses can form data races. We then define exchangeable events to identify pairs of events such that their execution orders can be probably reversed in different executions. We further propose algorithms to detect three major kinds of concurrency vulnerabilities. To overcome potential imprecision of exchangeable events, we also adopt a validation to isolate real vulnerabilities. We implemented our algorithms as a tool ConVul and applied it on 10 known concurrency vulnerabilities and the MySQL database server. Compared with three widely-used race detectors and one detector based on maximal causal model, ConVul was significantly more effective by detecting 9 of 10 known vulnerabilities and 6 zero-day vulnerabilities on MySQL (four have been confirmed). However, other detectors only detected at most 3 out of the 16 known and zero-day vulnerabilities.
DOI 原文 ·
@inproceedings{paperbot5139,
title = {Detecting concurrency memory corruption vulnerabilities},
author = {Yan Cai and Biyun Zhu and Ruijie Meng and Hao Yun and Liang He and Purui Su and Bin Liang},
booktitle = {FSE},
year = {2019},
doi = {10.1145/3338906.3338927}
}