Skip to content

Back to the catalog

Don't let TEEs break your MPC
blog.trailofbits.comarticle

Don't let TEEs break your MPC

Trail of Bits explains why running threshold-signature MPC protocols inside TEEs (Intel TDX, AMD SEV-SNP, AWS Nitro Enclaves) is not automatically secure: a malicious host can roll back enclave filesystem state to force reuse of deleted pre-signature nonces, leaking a signer's private key share. The post catalogs recurring audit pitfalls — incomplete attestation measurements (citing the WhatsApp Private Inference LD_PRELOAD bypass), missing verification steps, weak hardening, stale-backup/rollback risks (including LUKS2 header manipulation in confidential VMs), and physical/side-channel attacks like TEE Fail and DDRop against DDR5 memory — and gives best practices such as binding attestation to MPC party identities and using multiple TEE vendors for defense-in-depth.

TL;DR Trail of Bits details how TEE rollback and attestation gaps can silently break threshold-signature MPC (e.g., nonce-reuse key leaks), plus hardening best practices.
Document

What it is

Trail of Bits' analysis of running threshold-signature MPC inside TEEs (Intel TDX, AMD SEV-SNP, AWS Nitro Enclaves). The summary already covers the central rollback attack and the pitfall catalog. What it omits are several concrete, actionable specifics an engineer can check against their own deployment.

What to do

Beyond "bind attestation to party identity" and "use multiple vendors," the post states these that the summary does not:

  • Override Intel's attestation grace period. Intel's vendor verification tools accept known-vulnerable firmware versions for one full year after public disclosure. The post recommends implementing your own security version number (SVN) validation on top of the defaults to enforce stricter deadlines — otherwise a compromised-but-patched-window firmware passes remote attestation cleanly.
  • **Terminate peer-to-peer channels inside the enclaves.** Establish TLS (or equivalent) with endpoints inside the secure enclaves themselves, not on the host, so the untrusted host cannot observe or tamper with protocol messages in transit.
  • Write constant-time crypto even inside the TEE. The host controls scheduling and can measure timing; constant-time implementations are still required for all secret-processing operations.
  • Never pull code at runtime (e.g., curl-ing tools into the enclave). Anything fetched after measurement is unmeasured; an attacker controlling that source gets attested-but-unverified code execution. This is the same class as the WhatsApp LD_PRELOAD bypass.
  • Trim and measure the image. Redundant kernel drivers, permissive kernel config flags, stray ACPI entries, unnecessary systemd services/timers, and weak entropy sources all sit inside the trust boundary — remove, harden, then measure what remains.

The freshness through-line

The post frames three separate attacks as the same failure — authenticated encryption gives confidentiality and integrity but not freshness:

  • filesystem rollback replaying a deleted pre-signature file (nonce reuse → key-share leak);
  • DDRop: a sub-$200 DDR5 interposer that silently drops memory writes so the CPU rereads stale-but-validly-decrypting data, breaking integrity on Intel TDX, Scalable SGX, and AMD SEV-SNP;
  • LUKS2 header malleability serving stale/null-cipher volume state.

Memory encryption without freshness fails the same way stale disk state does. If you defend against one, check the other two.

Caveats

The post's own limits: multi-vendor deployment is "challenging in practice" due to operational complexity, and it recommends it only for high-security applications. The overall verdict is that TEE+MPC is worthwhile only as defense-in-depth over a sound protocol — never as a substitute for one.

Organisations named here

  • DDRop
  • LD_PRELOAD
  • TEE Fail
  • WhatsApp Private Inference

Technologies named here

  • Intel TDX
  • Intel vendor-provided remote attestation verification tools
  • AMD SEV-SNP
  • Intel Scalable SGX
  • AWS Nitro Enclaves
  • Meta's WhatsApp Private Inference
  • LUKS2 disk encryption for confidential VMs
  • LUKS2
  • Intel SGX

Techniques named here

  • Side-channel attacks against TEE guest computation
  • Physical memory interposition
  • DDR5 write-dropping attack
  • LD_PRELOAD shared library injection
  • Incomplete attestation measurement exploitation
  • LUKS2 header manipulation
  • Stale backup / freshness rollback attack
  • Ambiguous encoding in hash functions
  • Missing parameters in Fiat-Shamir transforms
  • Missing input validation in threshold signature schemes
  • IV reuse
  • Malicious participant deviation in MPC