Abstract
Information leaks through side channels are a pervasive problem, even in security-critical applications. Functional side channels arise when an attacker knows that a secret value of a server stays fixed for a certain time. Then, the attacker can observe the server executions on a sequence of different public inputs, each paired with the same secret input. Thus for each secret, the attacker observes a (partial) function from public inputs to execution time, for instance, and she can compare these functions for different secrets.
Introduction
Side-channel vulnerabilities remain a significant threat to software security. Traditional analysis often focuses on "point-wise" noninterference—checking if two different secrets produce different execution times for a single public input. However, this approach fails to capture functional side channels, where a secret is leaked through the pattern of execution times across a range of public inputs.
Presented at NDSS 2020, FUCHSIA is a data-driven framework designed to detect and pinpoint the root causes of these functional leaks. By treating timing as a continuous function rather than a set of discrete points, FUCHSIA can identify vulnerabilities that are invisible to standard security tools.
The FUCHSIA Framework
FUCHSIA employs a multi-stage pipeline to move from raw source code to a localized, human-readable bug report:
- Evolutionary Fuzzing: The tool extends gray-box fuzzers like AFL and Kelinci to generate diverse public and secret inputs. The goal is to maximize the variety of timing behaviors observed.
- Functional Modeling: Raw timing data is often noisy due to system jitter. FUCHSIA uses B-splines to fit this data into smooth mathematical functions, capturing the underlying "shape" of the execution behavior.
- Functional Clustering: Secrets that produce similar timing functions are grouped using hierarchical and constrained K-means clustering. A leak is detected if secrets that should be indistinguishable end up in different clusters.
- Side-Channel Explanation: To aid debugging, FUCHSIA tracks internal program features (e.g., loop iterations, method calls) and uses a functional decision tree to correlate these features with the timing clusters, pointing developers directly to the problematic code.
The "Shape" of a Leak
A core insight of the FUCHSIA research is that the shape or derivative of a timing function can be more revealing than absolute values. In real-world scenarios, network latency might obscure exact timing, but the relative change in execution time as public inputs vary remains a powerful signal for attackers.
As shown in the figure above, different secret values (represented by different colors) produce distinct functional patterns. FUCHSIA leverages these patterns to distinguish between random noise and systematic information leakage.
Functional Modeling and Clustering
By modeling execution costs as continuous functions, FUCHSIA can apply robust distance metrics like the $L_1$-norm (the area between two curves). This approach is significantly more resilient to noise than the standard $L_\infty$-norm, which only considers the maximum difference at a single point.
This functional representation allows the tool to cluster secrets based on their overall behavior across the input space, making it possible to detect subtle leaks in complex, large-scale applications.
Results and Impact
The authors evaluated FUCHSIA on both micro-benchmarks and massive real-world Java libraries, including OpenJDK 8, Eclipse Jetty, and the iControl SOAP library.
- Zero-Day Discovery: FUCHSIA discovered a zero-day vulnerability in the OpenJDK regex engine (
java.util.regex), showing that secret regex patterns could be inferred by observing timing patterns of different input strings. - Superior Detection: In micro-benchmarks, FUCHSIA identified over 100 distinct classes of observations, whereas the previous state-of-the-art tool, DifFuzz, only found two.
- Scalability: The framework proved highly efficient, analyzing the iControl library (containing over 41,000 methods) and generating explanatory decision trees in approximately 10 seconds.
- Real-World Debugging: It successfully pinpointed a known vulnerability in the Jetty web server where password checking time leaked the password's length.
Conclusion
FUCHSIA represents a significant advancement in side-channel analysis by shifting the focus from individual data points to functional patterns. By combining evolutionary fuzzing with functional data analysis and decision trees, it provides a powerful, automated way to not only detect but also explain complex information leaks in modern software stacks.
Summary updated