How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel

Pengfei Wang, Jens Krinke, Kai Lü, Gen Li, Steve Dodier-Lazaro

UCL Discovery (University College London) · 2017 · 37 citations · 26 references

Concepts

Abstract

We present the first static approach that systematically
\ndetects potential double-fetch vulnerabilities in the Linux kernel. Using a pattern-based analysis, we identified 90
\ndouble fetches in the Linux kernel. 57 of these occur
\nin drivers, which previous dynamic approaches were unable
\nto detect without access to the corresponding hardware.
\nWe manually investigated the 90 occurrences, and
\ninferred three typical scenarios in which double fetches
\noccur. We discuss each of them in detail. We further developed
\na static analysis, based on the Coccinelle matching
\nengine, that detects double-fetch situations which can
\ncause kernel vulnerabilities. When applied to the Linux,
\nFreeBSD, and Android kernels, our approach found six
\npreviously unknown double-fetch bugs, four of them in
\ndrivers, three of which are exploitable double-fetch vulnerabilities.
\nAll of the identified bugs and vulnerabilities
\nhave been confirmed and patched by maintainers. Our
\napproach has been adopted by the Coccinelle team and
\nis currently being integrated into the Linux kernel patch
\nvetting. Based on our study, we also provide practical solutions
\nfor anticipating double-fetch bugs and vulnerabilities.
\nWe also provide a solution to automatically patch
\ndetected double-fetch bugs.

References

26