Bootstrap token comparison is not constant-time #72

Closed
opened 2026-04-05 16:23:11 +00:00 by Skipper · 0 comments
Owner

Info

Severity: HIGH
Attack vector: network-only

Impact

Allows an attacker on the same network segment to recover the bootstrap token and register a malicious user agent.

Description

The bootstrap token is compared using normal Rust String equality, which short-circuits on the first mismatching byte. That creates a timing side channel that leaks how much of the supplied token prefix matches the expected value.

Example flow

  1. Send repeated bootstrap token guesses over gRPC.
  2. Measure response timing differences caused by early-exit string comparison.
  3. Recover the token incrementally, byte by byte.
  4. Use the recovered token to register an attacker-controlled user agent before the legitimate operator does.

Mitigation

Replace the comparison with a constant-time equality function such as subtle::ConstantTimeEq.

# Info **Severity**: **HIGH** Attack vector: network-only ## Impact Allows an attacker on the same network segment to recover the bootstrap token and register a malicious user agent. ## Description The bootstrap token is compared using normal Rust `String` equality, which short-circuits on the first mismatching byte. That creates a timing side channel that leaks how much of the supplied token prefix matches the expected value. ## Example flow 1. Send repeated bootstrap token guesses over gRPC. 2. Measure response timing differences caused by early-exit string comparison. 3. Recover the token incrementally, byte by byte. 4. Use the recovered token to register an attacker-controlled user agent before the legitimate operator does. ## Mitigation Replace the comparison with a constant-time equality function such as `subtle::ConstantTimeEq`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#72