Skip to content

Meltdown-BR

Bound Range Exceeded (#BR) leak: bir hardware bound check (IA-32 bound ya da Intel MPX) #BR yükselttikten sonra ama exception retire olmadan önceki window'da out-of-bounds secret'ları transient olarak encode eden, exception güdümlü bir bounds-check bypass.

Mechanism

Neden çalışır

x86 CPU'lar, out-of-bounds array index'lerinde bir bound-range-exceeded exception (#BR) yükselten özel hardware instruction'ları içerir. Eski IA-32 ISA, bound opcode'unu tanımlar; modern Intel CPU'lar aynı amaç için Memory Protection eXtensions (MPX) (bndcl/bndcu) ekler.

Meltdown-BR, yükseltilen #BR exception'ın lazy handling'inden faydalanır. Canella et al.'ın belirttiği gibi, "hiçbir zaman architectural olarak görünmeyen out-of-bounds secret'ları encode etmek için bir #BR exception'ı izleyen transient execution'dan faydalanır." Bound instruction'ı ihlali sinyaller, ama CPU, #BR fiilen teslim edilip transient sonuçlar squash edilene kadar dependent load'ları/encode'ları transient olarak çalıştırmaya devam eder. Architectural olarak access hiç gerçekleşmez; microarchitectural olarak bir cache footprint'i bırakır.

Kritik sınıflandırma noktası: *"Spectre-PHT'ye benzer şekilde Meltdown-BR bir bounds check bypass'tır, ama bir predictor'ı mistrain etmek yerine yükseltilen

BR exception'ın lazy handling'inden faydalanır."* Yazarlar, bazı önceki

çalışmaların kullandığı Spectre-type etiketinin yanıltıcı olduğunu savunur çünkü bndcl/bndcu branch-predictor baskısı uygulamaz — "hiçbir prediction devrede değildir." Dolayısıyla Meltdown-BR, Spectre-PHT'ye exception güdümlü alternatiftir.

Meltdown-BR, parent #BR node'udur; MPX'e özgü yaprağı Meltdown-BND'dir ve legacy/MPX kombinasyonu Meltdown-MPX olarak planlanır (henüz ayrı bir not olarak instantiate edilmemiştir).

Sibling taxonomy'den farkı: Meltdown-BR'yi tetikleyen exception bir bounds-range ihlalidir (#BR) — sızdırılan şey OOB array data'sıdır. Bunu, farklı bir lazy-handled exception üzerine kurulu kardeş Meltdown yapraklarıyla karıştırmayın: Meltdown-GP (#GP, system register state), Meltdown-NM (#NM, başka process'in FPU/SIMD register'ları), Meltdown-P (present-bit / L1TF), Meltdown-PK (PKU/PKRU bypass) ve Meltdown-RW (R/W-bit; transient store).

Walkthrough

Proof-of-concept, IA32 bound ya da MPX ile korunan bir array index için bir Flush+Reload covert channel üzerinden out-of-bounds leakage'ı gösterir:

// Conceptual Meltdown-BR. Real PoCs: https://transient.fail/
// Protect 'data[index]' with a hardware bound check that raises #BR when OOB.
//   IA-32:  bound  reg, bounds_mem      (Intel + AMD)
//   MPX:    bndcl / bndcu               (Intel only)
// 'index' is out of bounds -> #BR is raised, but transiently:
uint8_t secret = data[index];     // out-of-bounds read in the pre-#BR window
(void)probe[secret * 4096];       // encode leaked byte into cache state
// decode: time each probe[i*4096]; fastest line index == leaked secret byte
  1. Bound check'i kur ki out-of-bounds bir index #BR tetiklesin (legacy bound ya da MPX bndcl/bndcu aracılığıyla).
  2. Transient olarak oku + encode et: out-of-bounds byte'ı, #BR handle edilmeden önce 256-entry'lik bir probe array'e.
  3. Flush+Reload ile decode et: cache'lenmiş probe line'ı geri okumak için.
Test edilen CPU'lar (Canella et al.'dan)
Meltdown-BR demonstrated via Flush+Reload on:
  - IA32 'bound' protection:  Intel  and  AMD
        AMD E2-2000, AMD Ryzen Threadripper 1920X
  - MPX protection:           Intel only
        Intel Skylake i5-6200U (with MPX support)
First demonstration of a Meltdown-type transient attack exploiting delayed
exception handling on AMD CPUs.

Warning

Meltdown-BR mevcut privilege level içinde çalışır (in-process bir out-of-bounds read), bu yüzden cross-privilege Meltdown-US için tasarlanmış KPTI/KAISER bunu ele almaz. Yazarlar, Meltdown-type division ve diğer fault'ların negatif sonuçlar verdiğini belirtir; Meltdown, trap'lere/abort'lara değil, (her an oluşabilen) fault'lara bağlı görünür.

Detection

Güvenilir bir victim-içi sinyal yok — out-of-bounds read hiçbir architectural state bırakmaz. Static analysis, bir serializing barrier'dan yoksun, attacker'ın kontrol ettiği access'lerin izlediği bound/bndcl/bndcu check'lerini işaretleyebilir.

Mitigation

  • Bound check'ten sonra serializing instruction (örneğin bound/MPX check'inden sonra lfence) transient execution'ı sınırlar. Canella et al., bunun yalnızca kısmi bir fix olduğu konusunda uyarır: bir bounds check'ten sonra serializing instruction'larla bile, TLB üzerinden tek bir memory access aracılığıyla Intel'de hâlâ sızdırabildiler. (Not: ARM, x86 bound/MPX'i implemente etmez, dolayısıyla Meltdown-BR ARM'a doğrudan uygulanmaz; bu serializing-instruction gözleminin ARM'a genellenip genellenmediği burada doğrulanmamıştır.)
  • Untrusted index'ler için bound/MPX'e bir güvenlik sınırı olarak güvenmeyin; Intel MPX deprecate edilmiştir.

References