PDiff: Semantic-based Patch Presence Testing for Downstream Kernels
Authors:
Open Access
- 30 October 2020
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1149-1163
Abstract
Open-source kernels have been adopted by massive downstream vendors on billions of devices. However, these vendors often omit or delay the adoption of patches released in the mainstream version. Even worse, many vendors are not publicizing the patching progress or even disclosing misleading information. However, patching status is critical for groups (e.g., governments and enterprise users) that are keen to security threats. Such a practice motivates the need for reliable patch presence testing for downstream kernels. Currently, the best means of patch presence testing is to examine the existence of a patch in the target kernel by using the code signature match. However, such an approach cannot address the key challenges in practice. Specifically, downstream vendors widely customize the mainstream code and use non-standard building configurations, which often change the code around the patching sites such that the code signatures are ineffective. In this work, we propose PDiff, a system to perform highly reliable patch presence testing with downstream kernel images. Technically speaking, PDiff generates summaries carrying the semantics related to a target patch. Based on the semantic summaries, PDiff compares the target kernel with its mainstream version before and after the adoption of the patch, preferring the closer reference version to determine the patching status. Unlike previous research on patch presence testing, our approach examines similarity based on the semantics of patches and therefore, provides high tolerance to code-level variations. Our test with 398 kernel images corresponding to 51 patches shows that PDiff can achieve high accuracy with an extremely low rate of false negatives and zero false positives. This significantly outperforms the state-of-the-art tool. More importantly, PDiff demonstrates consistently high effectiveness when code customization and non-standard building configurations occur.Keywords
Funding Information
- National Natural Science Foundation of China (U1636204, U1836210, U1836213, U1736208, 61972099)
- Natural Science Foundation of Shanghai Municipality (19ZR1404800)
- National Program on Key Basic Research (NO. 2015CB358800)
This publication has 26 references indexed in Scilit:
- Scalable Graph-based Bug Search for Firmware Images2016
- Robust Fingerprinting for Relocatable Code2015
- Image-based kernel fingerprintingDigital Investigation, 2014
- AppSealer: Automatic Generation of Vulnerability-Specific Patches for Preventing Component Hijacking Attacks in Android Applications2014
- PatchDroid2013
- BinSlayer2013
- iBinHunt: Binary Hunting with Inter-procedural Control Flow2013
- BinHunt: Automatically Finding Semantic Differences in Binary Programs2008
- A survey on tree edit distance and related problemsTheoretical Computer Science, 2005
- Learning string-edit distanceIEEE Transactions on Pattern Analysis and Machine Intelligence, 1998