DSAC: Effective static analysis of sleep-in-atomic-context bugs in kernel modules

Jia Ju Bai, Yu Ping Wang, Julia Lawall, Shi Min Hu

科研成果: 书/报告/会议事项章节会议稿件同行评审

14 引用 (Scopus)

摘要

In a modern OS, kernel modules often use spinlocks and interrupt handlers to monopolize a CPU core to execute concurrent code in atomic context. In this situation, if the kernel module performs an operation that can sleep at runtime, a system hang may occur. We refer to this kind of concurrency bug as a sleep-in-atomic-context (SAC) bug. In practice, SAC bugs have received insufficient attention and are hard to find, as they do not always cause problems in real executions. In this paper, we propose a practical static approach named DSAC, to effectively detect SAC bugs and automatically recommend patches to help fix them. DSAC uses four key techniques: (1) a hybrid of flow-sensitive and -insensitive analysis to perform accurate and efficient code analysis; (2) a heuristics-based method to accurately extract kernel interfaces that can sleep at runtime; (3) a path-check method to effectively filter out repeated reports and false bugs; (4) a pattern-based method to automatically generate recommended patches to help fix the bugs. We evaluate DSAC on kernel modules (drivers, file systems, and network modules) of the Linux kernel, and on the FreeBSD and NetBSD kernels, and in total find 401 new real bugs. 272 of these bugs have been confirmed by the relevant kernel maintainers, and 43 patches generated by DSAC have been applied by kernel maintainers.

源语言英语
主期刊名Proceedings of the 2018 USENIX Annual Technical Conference, USENIX ATC 2018
出版商USENIX Association
587-599
页数13
ISBN(电子版)9781939133021
出版状态已出版 - 2020
已对外发布
活动2018 USENIX Annual Technical Conference, USENIX ATC 2018 - Boston, 美国
期限: 11 7月 201813 7月 2018

出版系列

姓名Proceedings of the 2018 USENIX Annual Technical Conference, USENIX ATC 2018

会议

会议2018 USENIX Annual Technical Conference, USENIX ATC 2018
国家/地区美国
Boston
时期11/07/1813/07/18

指纹

探究 'DSAC: Effective static analysis of sleep-in-atomic-context bugs in kernel modules' 的科研主题。它们共同构成独一无二的指纹。

引用此