Thermal Management & Side Channels
Clock Distribution & Power Management · Hardware Foundations track
11 min read
In this module
Heat: The Unavoidable Byproduct
Every watt a processor consumes ends up as heat. A 250W CPU radiates roughly the same thermal load as a powerful heat lamp, packed into die area smaller than a postage stamp. Fail to haul that heat away fast enough and the junction temperature climbs until the silicon gives up. Thermal management is also an information channel — what the chip computes leaves a heat signature an attacker can read.
Heat Dissipation Mechanisms
Heat moves from the die to the environment through three physical mechanisms:
Conduction: Heat flows through solid materials from hot regions to cold ones. In a CPU package, the conduction path runs die → Thermal Interface Material (TIM) → Integrated Heat Spreader (IHS) → second TIM layer → heatsink. Thermal conductivity of each material sets how well heat moves through it.
Convection: Air or liquid flowing over the heatsink carries heat away. Natural convection (hot air rising) barely shifts anything; for real thermal loads you need forced convection — fans or liquid pumps. Convective heat transfer scales with fin surface area, airflow velocity, and the heatsink-to-ambient temperature gap.
Radiation: Everything emits infrared radiation in proportion to the fourth power of its absolute temperature (Stefan-Boltzmann). At CPU cooling temperatures (50-100 degrees Celsius), radiation accounts for a few percent of dissipation at best. You can usually ignore it.
Heat flow path:
Die (105C) ──TIM1──> IHS (73C) ──TIM2──> Heatsink (57C) ──Air──> Ambient (25C) │ │ │ └─ ~0.2 C/W ────────┘─ ~0.1 C/W ──────────┘─ ~0.2 C/W (conduction) (conduction) (convection)
Total thermal resistance: ~0.5 C/W (illustrative values) At 160W: drops of 32C, 16C and 32C give the temperatures above At 250W: 250 x 0.5 = 125C above ambient = 150C junction temp (too hot!) → Need better cooling (lower thermal resistance) or lower powerThermal Interface Materials
Thermal Interface Material (TIM) plugs the microscopic air gaps between two mating surfaces. Skip the TIM and metal-to-metal contact happens only at surface peaks, with the trapped air acting as a thermal insulator.
TIM1 (between die and IHS): Consumer CPUs traditionally used a thermal paste or compound here. Intel flip-flopped — switched to indium-based solder in some generations for better conductivity, swung back to polymer TIM, then back to solder again. Solder has roughly 5-10x the conductivity of paste, but it stresses the die mechanically during thermal cycling.
TIM2 (between IHS and heatsink): Usually a thermal paste applied by the user or pre-applied to the heatsink. Decent pastes hit 5-12 W/m-K; liquid metal can exceed 70 W/m-K, but it's electrically conductive and quite happy to short out your motherboard if it leaks.
Enthusiast overclockers sometimes delid their CPUs, removing the IHS to replace the factory TIM1 with liquid metal. This can reduce peak temperatures by 10-20 degrees Celsius, enabling higher sustained clock speeds. However, it voids the warranty, risks physical damage to the die, and liquid metal can corrode aluminium heatspreaders over time. Server and professional workstation CPUs typically use solder TIM from the factory, making delidding unnecessary.
Heatsink Design
A heatsink increases the effective surface area available for convective heat transfer. The key design parameters are:
- Fin count and spacing: More fins mean more surface area, but fins that are too closely spaced restrict airflow. Optimal spacing depends on the fan's static pressure capability.
- Base thickness: A thicker base spreads heat more evenly across the fins. A thin base creates a hotspot directly above the die.
- Material: Copper has nearly twice the thermal conductivity of aluminium (385 vs 205 W/m-K) but is heavier and more expensive. Many heatsinks use a copper core with aluminium fins.
- Heat pipes / vapour chambers: Sealed copper tubes containing a working fluid that evaporates at the hot end and condenses at the cool end, transferring heat far more efficiently than solid copper. Tower coolers and laptop cooling systems rely heavily on heat pipes.
Liquid cooling (All-In-One or custom loops) swaps the air heatsink for a water block on the CPU, plumbed via tubes to a fanned radiator. Water carries roughly 3,500 times the volumetric heat capacity of air (about 4.2 J/cm³·K against 0.0012), soaking up far more heat before its temperature climbs. The radiator then dumps that heat into the air, but across a much larger surface area than a direct air cooler can muster.
Thermal Throttling
When the cooling system cannot remove heat fast enough, the die temperature rises. Every modern processor includes thermal protection mechanisms that reduce performance to prevent damage.
Digital Thermal Sensors (DTS)
Modern CPUs sprinkle Digital Thermal Sensors across the die. Intel typically places one per core plus several in shared regions. Each sensor reports temperature digitally — 1 degree Celsius resolution, a few degrees of accuracy.
Sensors report temperature relative to Thermal Junction Maximum (Tj_max), the absolute safe limit for the silicon (around 100-105 degrees Celsius for desktops, 100 for laptops). A DTS reading of "20" means the junction is sitting 20 degrees below Tj_max.
PROCHOT and Throttling Mechanisms
When any DTS reading reaches the threshold, the processor's Thermal Control Circuit (TCC) activates. Intel exposes this through the PROCHOT# (Processor Hot) signal:
- Clock modulation: The processor inserts idle cycles (duty cycling), reducing the effective clock speed. For example, 50% modulation means the clock runs for half the cycles and is gated for the other half.
- P-state reduction: The DVFS controller reduces the voltage and frequency to a lower P-state, cutting both dynamic and static power.
- Core parking: Individual cores may be powered down entirely if the thermal budget cannot accommodate all active cores.
- Turbo boost limiting: The maximum boost frequency is reduced, preventing the processor from entering high-power turbo states.
The mechanisms ladder progressively. Mild thermal pressure trims turbo boost. Moderate pressure pulls down the base frequency. Severe pressure brings out aggressive clock modulation. The processor always protects itself first, even if that means crawling at a fraction of its rated speed.
Software can detect thermal throttling by reading the IA32_THERM_STATUS MSR (on Intel) or equivalent registers on AMD. Bit 0 indicates the thermal status, and bit 1 indicates whether throttling has occurred since the last read. Performance monitoring tools like HWiNFO, Intel Power Gadget, and Linux's turbostat expose this information. Persistent throttling indicates inadequate cooling.
Junction Temperature and Thermal Runaway
The maximum junction temperature (Tj_max) is set by the semiconductor physics. Above approximately 125 degrees Celsius, several degradation mechanisms accelerate:
- Electromigration: Metal atoms in the interconnect wires are displaced by current flow. The rate doubles for every 10 degree increase, eventually causing open circuits.
- Hot carrier injection: High-energy electrons become trapped in the gate oxide, shifting transistor threshold voltages over time.
- Negative Bias Temperature Instability (NBTI): Threshold voltage shifts in PMOS transistors, worsening at higher temperatures.
Thermal runaway kicks in when rising temperature drives more leakage current, which drives more power dissipation, which drives temperature higher still. A positive feedback loop. At sufficiently high temperatures, leakage outruns dynamic power and the chip stops being coolable. That's why hard thermal shutdown lives in hardware, not firmware. Hit the absolute maximum (typically 110-125 degrees Celsius) and the processor cuts power immediately, regardless of what software or firmware thought was happening.
The die does not heat uniformly. Execution units, register files, and clock distribution networks generate more heat per unit area than cache arrays. A modern CPU die may have hotspot temperatures 15-20 degrees above the die average. Thermal simulation tools generate detailed thermal maps showing temperature distribution across the die, and physical layout engineers use this data to place the hottest blocks near the centre of the die (closest to the IHS centre) or near dedicated cooling structures.
Thermal Side Channels
A processor's thermal behaviour is also an information channel. Different computations dissipate different amounts of heat, so an attacker who can measure the chip's temperature (or a nearby component's) can deduce what the chip is doing.
How Thermal Side Channels Work
Different instruction types consume different power and generate different heat:
- Integer multiplication generates more heat than addition
- AES encryption generates more heat than idle loops
- Cache misses (waiting for memory) generate less heat than cache hits (continuous computation)
If an attacker can sample the chip's surface temperature over time (infrared camera, thermocouple, or even the chip's own exposed thermal sensors), the temperature trace tells the story of what's running.
Thermal channels are slow compared to power or electromagnetic ones. Temperature changes drift through the package on millisecond-to-second timescales, smearing out fine-grained timing. They still reveal plenty:
- Whether a specific algorithm is running (AES vs RSA vs idle)
- The rough structure of a computation (loops, conditionals)
- Workload patterns over time
Thermal channels matter most for co-located cloud workloads, where an attacker's VM shares a physical CPU with a victim's VM. The attacker can't directly measure the victim's power consumption, but thermal effects propagate through the shared silicon all the same.
Timing Side Channels from DVFS
Dynamic Voltage and Frequency Scaling opens up a subtler but potent channel. When a heavy workload pushes the processor to a higher P-state (more voltage, more frequency), or when thermal throttling forces a step down, the frequency change ripples out to every process sharing that voltage domain.
Consider this scenario:
- A victim process begins an AES encryption (high power)
- The processor boosts to a higher P-state to accommodate the load
- An attacker process, running on a sibling core in the same voltage domain, measures its own execution time for a fixed reference workload
- The attacker observes that its reference workload completed slightly faster (higher frequency) or slower (throttling), revealing the victim's computational pattern
The channel exists because DVFS works at voltage-domain granularity (often shared between cores), not per process. Server parts with per-core voltage and frequency control (Intel's since Haswell-EP) blunt the issue across separate cores, but most client chips still share one core voltage rail, and nothing helps hyperthreading siblings sharing a core.
Researchers have turned this into real key extraction. Hertzbleed (2022) showed that on Intel and AMD x86 chips, the boost frequency depends on the power drawn, and power depends on the data being processed, so even constant-time cryptographic code runs measurably faster or slower depending on its secret inputs. The authors recovered keys from a constant-time implementation of the SIKE post-quantum scheme over the network. The frequency steps are small, tens of MHz, but high-resolution timing picks them up. Its predecessor PLATYPUS (2020) read the power side channel directly through Intel's RAPL energy counters, which led Intel and Linux to restrict unprivileged access to RAPL. Thermal covert channels, where one core heats the die and another reads the temperature sensors, have been demonstrated too.
Power Analysis Attacks
While detailed power analysis attack techniques are covered in Side-Channel Attacks, it is worth understanding the connection to power management.
Simple Power Analysis (SPA) reads the shape of the overall power trace. Power management systems hand the attacker a rich signature for free: DVFS transitions, clock gating events, and thermal throttling are all written into the trace, and the workload's structure shows through.
Differential Power Analysis (DPA) runs statistical correlation between tiny power variations and the specific data values being processed. The power delivery network from Lesson 3 is the physical medium for that leak. Every current wobble in the on-die power grid travels through the PDN to the VRM, where a current probe on the motherboard can pick it up.
Power Management as an Amplifier
Ironically, power management features can amplify side-channel leakage:
- DVFS transitions create large, easily observable frequency steps in response to workload changes
- Clock gating events reveal which functional units are active or idle
- Turbo boost decisions expose whether the processor is thermally or power constrained
- Per-core P-states reveal which cores are under heavy load
These coarse-grained power management events are far easier to observe than the fine-grained transistor switching DPA chases. An attacker may not need an oscilloscope or current probe at all. Software-side execution-time measurements can already expose DVFS state changes.
Defending against these side channels requires a combination of approaches. Constant-time algorithms remove data-dependent timing and control flow, which is necessary but, as Hertzbleed showed, not sufficient: the power they draw can still depend on the data, and DVFS turns that power into timing. Intel and AMD's guidance for the most sensitive code is to combine constant-time code with masking or blinding of secret values, and in some cases to cap or disable frequency boost. Noise injection adds random operations to obscure the power signature. Voltage domain isolation prevents one tenant from observing another's DVFS behaviour. Temporal isolation (flushing shared state between security contexts) limits the observation window. No single technique is sufficient; defence in depth is required. The fundamental tension is that power management features that improve energy efficiency simultaneously increase side-channel leakage.
The Power-Performance-Security Triangle
Clock distribution and power management sit at the intersection of three competing concerns:
Performance wants high clock frequencies, aggressive turbo boost, and minimal throttling. All of which jack up power consumption and thermal output.
Efficiency wants fine-grained DVFS, clock gating, and adaptive voltage. All of which create observable state changes that bleed information.
Security wants constant-time execution, uniform power profiles, and isolated voltage domains. All of which kneecap power management and bleed performance or efficiency.
Modern architects spend their lives navigating this triangle, picking the trade-offs that balance the three pulls. No clean win exists. Every optimisation on one axis costs you on another. Anyone working on hardware security, system design, or performance engineering needs to live inside that trade-off space.