Abstract
Traditionally, power side-channel analysis requires physical access to the target device and specialized measurement equipment. Recent research has demonstrated that on-chip power meters in x86 platforms can be exploited via software. This paper extends this vulnerability to Apple Silicon (M1/M2), identifying that the System Management Controller (SMC) exposes power-related keys to user-space software. We demonstrate data-dependent power consumption reporting through these keys and show how an unprivileged application can recover AES encryption keys from a kernel-mode driver in macOS. Our findings highlight significant implications for modern on-chip power management security.
Introduction
With the transition to Apple Silicon, the proprietary M1 and M2 architectures introduced sophisticated power management systems. While these systems optimize performance and efficiency, they also introduce potential side-channels. This research investigates whether the System Management Controller (SMC), which reports real-time power data, leaks enough information to facilitate remote cryptographic attacks without physical hardware access.
Methodology
The research team employed a multi-stage approach to identify and exploit these vulnerabilities:
- SMC Key Discovery: Using a custom fuzzer, the researchers identified undocumented SMC keys starting with "P" (Power). By comparing idle and load states, they isolated keys that specifically tracked CPU power consumption.
- Leakage Assessment (TVLA): Welch’s t-test was applied to determine if different data inputs (e.g., all 0s vs. all 1s) produced statistically significant differences in power readings. This confirmed which keys were "leaky."
- Correlation Power Analysis (CPA): The core attack involved building hypothetical power models based on the Hamming Weight of intermediate AES-128 states. These models were correlated against real-time SMC readings to extract the secret key.
Key Insights: The "PHPC" Smoking Gun
Among the dozens of discovered keys, PHPC emerged as the primary vector. It provides microwatt-resolution data that correlates perfectly with processed data. Crucially, these power meters are accessible to unprivileged user-mode applications, allowing a malicious app to bypass standard security boundaries and spy on privileged kernel operations.
While other interfaces like IOReport provide power data, their millijoule resolution is too coarse for side-channel attacks. The SMC keys, however, provide the fine-grained detail necessary to distinguish individual bits of a cryptographic key.
Experimental Results
The attack was tested on a Mac Mini (M1) and a MacBook Air (M2). The researchers collected up to 1 million traces to evaluate the effectiveness of different power models.
- Key Recovery: On the M2, the attack successfully recovered 6 full bytes of a 16-byte AES-128 key and placed another 6 bytes within the top 10 guesses. The M1 system proved slightly more resilient but still leaked 2 full bytes.
- Model Efficiency: The
Rd0-HW(Round 0 Hamming Weight) model was the most effective, showing the fastest convergence toward the correct key as trace counts increased.
Discussion and Countermeasures
While the sampling rate of SMC keys is relatively slow (approximately 1Hz), requiring millions of operations to gather sufficient data, the breach of the privilege boundary is a significant security concern. The researchers also explored frequency throttling (similar to the Hertzbleed attack) but found that Apple Silicon's throttling logic did not currently yield a data-dependent timing side-channel.
To mitigate these risks, it is recommended that Apple restricts user-space access to power-related SMC keys or implements signal masking (noise) in power reporting, similar to mitigations adopted by Intel and AMD for the PLATYPUS vulnerability. These findings were responsibly disclosed to Apple in late 2022.
Summary updated