Finding Taint-Style Vulnerabilities in Linux-based Embedded Firmware with SSE-based Alias Analysis

Kai Cheng, Tao Liu, Le Guan, Peng Liu, Hong Li, Hongsong Zhu, Limin SunarXiv 2021

Abstract

The security of Linux-based embedded firmware is a critical concern, yet traditional analysis methods struggle with the complexities of binary code. We present EmTaint, a static analysis tool that utilizes a novel Structured Symbolic Expression (SSE) approach to track memory aliases and resolve indirect function calls. EmTaint achieves high precision and coverage, discovering 151 new 0-day vulnerabilities in popular IoT firmware from major vendors.

Introduction

Embedded firmware in devices like routers and smart cameras often contains "taint-style" vulnerabilities, such as command injections and buffer overflows, where untrusted user input reaches sensitive sinks. Static analysis of these binaries is challenging due to two primary hurdles: complex pointer aliasing and indirect function calls. Without accurate alias analysis, tools lose track of tainted data; without resolving indirect calls, the control flow graph remains fragmented.

Conceptual overview of taint propagation through multi-level and inter-procedural aliases.

Methodology

EmTaint addresses these challenges through a multi-stage pipeline centered on SSE-based alias analysis. Unlike traditional store-based methods that track values in specific memory slots, EmTaint uses Structured Symbolic Expressions (SSE) to track the provenance of data. SSE describes how a value was accessed (e.g., an offset from a specific register), making it more resilient to the symbolic nature of binary memory addresses.

System Architecture

The EmTaint workflow begins with firmware preprocessing, followed by SSE-based demand-driven alias analysis. This analysis feeds into both indirect call resolution and a taint-style vulnerability check module. By tracking function pointers back to their origins using SSE, EmTaint can resolve indirect calls (e.g., callbacks or function tables), "repairing" the control flow graph and significantly increasing the reachability of potential vulnerability sinks.

The EmTaint system architecture, illustrating the flow from firmware preprocessing to vulnerability reporting.

Evaluation and Results

EmTaint was evaluated on 35 real-world firmware samples from vendors including Cisco, D-Link, and NETGEAR, as well as a comparative dataset of 49 samples.

  • Vulnerability Discovery: EmTaint identified 192 total bugs, including 151 0-day vulnerabilities. 115 CVE/PSV numbers have been assigned based on these findings.
  • Precision and Efficiency: In a random sample of 100 alerts, 86% were true positives. The tool is highly efficient, averaging 3 minutes per firmware sample and resolving over 12,000 indirect calls in approximately one hour.
  • Comparative Performance: EmTaint significantly outperformed existing tools like KARONTE and SaTC, finding 1,518 true positives compared to 46 and 683, respectively, on the same dataset.

Conclusion

EmTaint demonstrates that a store-less, SSE-based approach to alias analysis can dramatically improve the effectiveness of static taint analysis for embedded firmware. By resolving indirect calls and precisely tracking aliases, it uncovers vulnerabilities that previous state-of-the-art tools missed. Future work will focus on improving handling of complex arithmetic and dynamic heap allocation to further reduce false positives.

Summary updated

BibTeX
@misc{cheng2021finding,
  author = {Kai Cheng and Tao Liu and Le Guan and Peng Liu and Hong Li and Hongsong Zhu and Limin Sun},
  title = {{Finding Taint-Style Vulnerabilities in Linux-based Embedded Firmware with SSE-based Alias Analysis}},
  year = {2021},
  eprint = {2109.12209},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.12209},
}
Figure