In early 2023, Intel disclosed CVE-2023-28746, a hardware security flaw found in some Intel Atom processors. This bug allows attackers with local system access to leak sensitive data from the CPU register files using microarchitectural side-effects following *speculative execution* — a common trick used by Spectre-like attacks.
In simpler words: If a program can run code on your machine, it may be able to peek inside the CPU and grab secret data (like passwords, encryption keys, or anything else lurking in memory).
2. The Core Problem: Information Leaks After Speculative Execution
When modern CPUs try to run code super fast, they do something called *speculative execution*. They “guess” future instructions and run them in advance. If their “guess” turns out wrong, they roll back — but sometimes microscopic traces of what they did* stick around.
Turns out, on some Intel Atom chips, certain data in the *register files* (tiny memory spaces in your CPU) may stay around and can be observed by clever attackers *even after the processor thought it erased that data.*
This is a textbook example of a side-channel attack. Even without normal access to private data, you watch how the processor behaves (timings, cache states, etc.) to infer secrets.
3. Which Intel CPUs Are Affected?
CVE-2023-28746 affects multiple Atom processor lines, mostly used in embedded devices, IoT, and netbooks. See Intel’s official advisory for a full list.
Main Impact:
Any *local* user (someone with at least an account on the machine) can perform this attack.
Prepare Data: Malicious code runs and fills the CPU register with known secret value.
2. Trigger Speculative Execution: The code purposely causes the CPU to speculate, accessing these register values.
3. Flush and Reload: After speculation, the attacker measures microarchitectural side-effects (often using cache timing tricks) to infer the protected data stored in registers.
Why does it work?
Resetting the *visible* register doesn’t always clear all microarchitectural traces. Timings and cache hits can still reveal what was there.
5. Code Demo: Observing Register Leaks
Here’s a basic “cache-timing” attack modeled after Spectre. It’s simplified for learning — real-world exploits use more advanced tricks.
> Warning: This is for educational use — don’t run this on production systems.
#include <stdio.h>
#include <stdint.h>
#include <x86intrin.h>
unsigned int array[256 * 4096];
// Victim function
void victim_function(uint8_t secret) {
// Secret data influences which cache line is loaded
array[secret * 4096] += 1;
}
int main() {
uint8_t secret = 123; // Example “sensitive” value
int i, mix_i, junk = ;
// Flush cache
for (i = ; i < 256; i++)
_mm_clflush(&array[i * 4096]);
// Speculate and leak secret into cache
victim_function(secret);
// Recover: check which array index loads fastest (cache hit)
int min = 100, idx = -1, time;
for (i = ; i < 256; i++) {
mix_i = ((i * 167) + 13) & 255;
uint64_t start = __rdtscp(&junk);
junk = array[mix_i * 4096];
uint64_t end = __rdtscp(&junk) - start;
if (end < min) {
min = end;
idx = mix_i;
}
}
printf("Leaked value: %d (actual: %d)\n", idx, secret);
return ;
}
A “victim” function accesses an array using the *secret* value.
- After speculative execution, the attacker measures how quickly each cache line can be accessed — the fastest hit reveals the secret.
How is this related to CVE-2023-28746?
In the Atom attack, the same technique applies, but targets register file residue instead of just branch prediction or cache state. The attacker’s goal: catch whatever residual data the CPU leaves behind after speculative instructions hit register files.
6. Protecting Your Systems
- Update firmware/microcode: Intel released microcode updates to fix the leakage.
- Enable OS mitigations: Major OS vendors (Linux, Windows) will include workarounds or microcode updates.
- Minimize running untrusted code locally: Side-channel attacks only work if the attacker can execute code on your system.
7. References and Further Reading
- Intel Security Advisory SA-00805 (CVE-2023-28746)
- MITRE: CVE-2023-28746
- Intel Microcode Update Download
- Spectre Attacks: Exploiting Speculative Execution
- Linux Kernel Documentation: Mitigations for Side Channel Vulnerabilities
Summary
CVE-2023-28746 is a hardware flaw affecting Intel Atom processors. With local code execution, this bug enables leaking secrets directly from CPU register files using microarchitectural tricks. Firmware and OS updates can limit the risk. Don’t let untrusted users run code on critical Atom-powered devices until patched!
Timeline
Published on: 03/14/2024 17:15:50 UTC
Last modified on: 03/14/2024 18:11:35 UTC