Krace: Data Race Fuzzing for Kernel File Systems
Authors:
- 1 May 2020
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1643-1660
Abstract
Data races occur when two threads fail to use proper synchronization when accessing shared data. In kernel file systems, which are highly concurrent by design, data races are common mistakes and often wreak havoc on the users, causing inconsistent states or data losses. Prior fuzzing practices on file systems have been effective in uncovering hundreds of bugs, but they mostly focus on the sequential aspect of file system execution and do not comprehensively explore the concurrency dimension and hence, forgo the opportunity to catch data races.In this paper, we bring coverage-guided fuzzing to the concurrency dimension with three new constructs: 1) a new coverage tracking metric, alias coverage, specially designed to capture the exploration progress in the concurrency dimension; 2) an evolution algorithm for generating, mutating, and merging multi-threaded syscall sequences as inputs for concurrency fuzzing; and 3) a comprehensive lockset and happens-before modeling for kernel synchronization primitives for precise data race detection. These components are integrated into Krace, an end-to-end fuzzing framework that has discovered 23 data races in ext4, btrfs, and the VFS layer so far, and 9 are confirmed to be harmful.Keywords
This publication has 32 references indexed in Scilit:
- A Study of Linux File System EvolutionACM Transactions on Storage, 2014
- Effective pattern-driven concurrency bug detection for operating systemsJournal of Systems and Software, 2012
- SharC2008
- Race directed random testing of concurrent programs2008
- Learning from mistakes2008
- MUVI2007
- RELAY2007
- Efficient on-the-fly data race detection in multithreaded C++ programs2003
- EraserACM Transactions on Computer Systems, 1997
- Time, clocks, and the ordering of events in a distributed systemCommunications of the ACM, 1978