arXiv:2611.09879cs.CRNov 2026

Manuscript Offprint

arXiv:2611.09879

PhotoFinish: Portable Timerless Probing of Microarchitectural Latencies

Tristan Hornetz, Eduard Ebert, Lorenz Hetterich, Lukas Gerlach, Michael Schwarz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Timing measurements are a fundamental building block of microarchitectural attacks, enabling software to convert otherwise invisible latency differences into architectural observations. Thus, restricting high-resolution timers is a common defense, especially in constrained environments such as web browsers. Timerless probing primitives provide an alternative approach. Instead of reading or constructing a timer, they observe architectural events that correlate with the microarchitectural state. However, such primitives typically rely on platform-specific behavior, and none generalizes across the wider computing landscape.

In this paper, we present PhotoFinish, a portable timerless probing primitive that converts latency differences directly into an architectural value. PhotoFinish races an operation under test against a fixed reference in two parallel threads that then write unique values to the same shared location, resulting in a latency-dependent architectural value. PhotoFinish only requires parallel execution and shared memory, without constructing or reading a clock. We evaluate PhotoFinish on 38 CPUs spanning four ISAs and demonstrate reliable cache-state classification across widely different microarchitectures, with comparable fidelity when compiled to WebAssembly and executed inside a browser. We further use PhotoFinish in AES T-table and Evict+Reload attacks, show that it applies beyond caches to TLB and execution-engine latencies, and demonstrate sufficient precision to identify the LLC slice of an address. Our results demonstrate shared-memory races as a generic and precise replacement for explicit timing, showing that restricting timers alone does not prevent software from observing fine-grained microarchitectural latency differences.

1 Introduction

Software-based microarchitectural attacks remain a practical threat to the confidentiality and integrity of modern systems. They exploit effects below the architectural abstraction, such

as cache state [45, 72], branch-predictor state [14, 37], TLB state [17, 38], execution-unit contention [5, 53], or DRAM row-buffer state [48]. Transient-execution attacks additionally exploit instructions that execute transiently and leave observable microarchitectural traces [12, 34, 41]. Although these effects are not directly visible in a program's architectural state, they affect execution time. Thus, attackers can infer information across security boundaries by observing small latency differences in otherwise ordinary software execution.

A central building block of many such attacks is a timing measurement primitive. The attacker executes an operation whose latency depends on microarchitectural state and then classifies it as fast or slow. In cache attacks, this operation is commonly a memory access [20, 52, 72]. In other attacks, it may be a branch [4, 14, 37], an instruction sequence contending for a shared execution resource [5, 24], a page-table walk [19, 38], or an instruction's execution time [7]. In all cases, the attacker needs a way to turn a microarchitectural latency difference into an observation that software can use.

Traditionally, attackers obtain this observation using an incrementing timer. The attacker timestamps the operation before and after execution and compares the difference against a fixed threshold. Consequently, a common defense strategy is to restrict access to high-resolution timers: browsers reduce timer resolution and introduce jitter [54, 58, 64], or disable them in specific settings [27, 39, 62]. These restrictions do not remove the underlying latency difference. They only remove the most direct way to observe it. Attackers can compensate by amplifying the targeted difference [6, 49, 57, 61] or constructing software clocks such as counter threads [18, 39, 54].

An alternative is to avoid constructing a timer altogether. Existing timerless primitives expose microarchitectural state through specialized instructions [13, 25, 33, 63, 73, 75] or environment-specific properties of the cache hierarchy [21, 31, 62, 63]. These techniques demonstrate that explicit timestamps are not essential, but they replace the dependence on a timer with assumptions about a particular ISA, processor feature, or cache implementation. This leaves a portability gap: existing timerless primitives do not provide a generic way to observe latency differences across architectures and restricted execution environments, such as browsers.

In this paper, we ask the following research question:

Can we build a generic primitive that observes microarchitectural latency differences without reading a timer and without relying on specialized architecture-specific features?

To answer this question, we present PhotoFinish, a timerless probing primitive applicable to all major computer architectures and even to restricted environments like web browsers. We base this primitive on an observation by Purnal et al. [49]: A race condition between two parallel threads can reveal microarchitectural timing differences when both threads write to a shared variable after finishing a workload. Specifically, one thread, which we call the probing thread T0, performs the target operation, whose latency depends on the microarchitectural state. In parallel, a reference thread T1 performs a reference operation with known latency. Finally, both threads write distinct values to the same shared result variable. When both threads complete, the final value of this variable reveals which store serialized last, showing whether the target operation was faster or slower than the reference. The key property of this approach is that the attacker does not need a timestamp. The primitive only requires two threads, shared memory, and sufficient control over instruction ordering.

With PhotoFinish, we develop this concept into a practical, generic, and near-universally applicable probing primitive for microarchitectural latencies. We distinguish between a padded and an unpadded variant. For sufficiently large latency differences, the unpadded variant works without prior calibration, which is typically required for timer-based primitives. For smaller latency differences, padded PhotoFinish adds a calibrated delay to T0. This moves the race boundary in the same way that a threshold moves the decision boundary in a timer-based attack, but without ever reading a clock.

We evaluate PhotoFinish on 38 CPUs spanning x86_64, AArch64, RISC-V, and LoongArch, and 45 platform configurations once hybrid architectures are separated. This breadth allows us to demonstrate PhotoFinish's platform-agnostic properties: For instance, unpadded PhotoFinish reliably separates L1 hits from DRAM accesses on most platforms, and padded PhotoFinish achieves this on all of them. This is despite vastly different core microarchitectures, interconnect topologies, and even instruction sets. A large set of test platforms also enables us to characterize PhotoFinish's performance broadly. We identify the quantity that bounds the resolution of unpadded PhotoFinish—the synchronization latency Δsync\Delta_{sync} between the two threads – and measure it across our evaluation set. This allows us to estimate the minimum latency difference for which unpadded PhotoFinish works. By quantifying the jitter in Δsync\Delta_{sync} between runs, we can additionally estimate this for the padded variant.

The results show that PhotoFinish enables timerless variants, e.g., of Flush+Reload [72] and Evict+Reload [39] on most platforms, a conclusion we also verify experimentally.

Padded PhotoFinish in particular features a high temporal accuracy, and can even distinguish adjacent cache levels on some target platforms. When multiple measurements of a target latency are permitted, we show that PhotoFinish can reliably resolve timing differences at the level of individual clock cycles. We demonstrate this by recovering an address's last-level-cache (LLC) slice on a 12-slice Intel CPU with 96.9% accuracy.

PhotoFinish is not limited to native code. We implement PhotoFinish in WebAssembly and evaluate it in Chromium for x86_64, using only the standard WebWorker parallelism and SharedArrayBuffer memory. We find that the synchronization latency strongly correlates with the native implementation (Pearson r = 0.930 across 50 matched configurations), and directly verify that browser-based PhotoFinish can distinguish L1 hits from DRAM accesses on all tested machines. This indicates that PhotoFinish's performance in the browser approaches that of the native implementation, making it a strong primitive for browser-based attacks. Additionally, we show that PhotoFinish remains effective when implemented in Lua, achieving near-perfect classification of cached and uncached accesses despite JIT compilation.

We further compare PhotoFinish with counter-thread timers, a common fallback when explicit timers are unavailable. Like counter threads, PhotoFinish remains affected by thread placement and cache-coherence behavior. Thus, its advantage is not independence from these mechanisms, but that it directly encodes the microarchitectural state into an architectural value instead of constructing a clock from periodically visible counter updates, which requires a (potentially adaptive) threshold. Across physical cores, this direct race usually provides a finer decision boundary and matches or slightly exceeds the classification accuracy of counting threads. Padded PhotoFinish provides the broadest coverage, while SMT-sibling counting threads remain competitive for smaller LLC-to-DRAM latency differences.

Finally, we show that PhotoFinish substitutes for a timer in vastly different scenarios, including complete attacks. We adapt a first-round AES T-table attack by replacing the timed reload step with PhotoFinish. On an Apple M1, where unprivileged code sees only a 24 MHz counter, we construct minimal L2 eviction sets and run an Evict+Reload-based covert channel entirely without a high-resolution timer. These case studies demonstrate that PhotoFinish is a practical primitive in environments where precise timers are restricted. Furthermore, we show the primitive is not specific to caches by detecting TLB residency, AVX wakeup throttling, and subnormal floating-point penalties.

Contributions. Our contributions can be summarized as follows:

• We present PhotoFinish, a generic timerless primitive that converts microarchitectural latency differences into the architectural outcome of a shared-memory race, and implement it on x86_64, AArch64, RISC-V, and LoongArch.

• We evaluate synchronization precision, latency classification, and counter-thread baselines on 38 systems across four ISAs, showing that PhotoFinish outperforms counting threads in many scenarios.

• We implement PhotoFinish in WebAssembly and demonstrate its efficacy inside the browser sandbox.

• We demonstrate that PhotoFinish can replace timed probing in practical settings, including an AES T-table attack and a timerless Evict+Reload-style case study.

References (63)