Skip to content

security: authenticate and version persistent storage against offline tampering #878

Description

@forkwright

Finding

The persistent root is wrapped in AES-256-XTS. XTS provides confidentiality but no authenticity, freshness, or rollback protection. The active threat model treats raw eMMC as attacker-controlled, while LFS currently relies on unkeyed structural magic and bounds. An offline attacker can therefore malleate ciphertext or replace the volume with an older valid snapshot without the storage layer detecting it.

Evidence

  • crates/thumos/src/encryption.rs implements sector-level AES-XTS without an authentication tag or persisted version.
  • crates/thumos/src/lfs.rs validates filesystem structure but has no keyed integrity or rollback anchor.
  • Phase 08 currently describes XTS as the persistent-root construction.
  • Phase 09 requires protected identity/session state and rollback rejection; those consumers cannot inherit that guarantee from the current volume.

Why this matters

This is software-first work. Live eMMC qualification cannot prove protection against crafted ciphertext, valid-volume rollback, tail substitution, or wholesale replacement. Treating XTS as a complete at-rest security boundary would overstate the system's resistance to an offline attacker.

Done when

  • The accepted storage threat model explicitly distinguishes confidentiality, integrity, freshness, and rollback resistance.
  • Persistent security-sensitive state uses an authenticated, versioned construction with domain-separated keys, nonces/tweaks that cannot repeat under the accepted lifecycle, and a durable rollback/freshness anchor.
  • Power-loss recovery defines atomic update and failure behavior without accepting unauthenticated plaintext or stale authenticated state.
  • Adversarial tests cover bit flips, sector swaps, replay of an older whole-volume image, torn metadata/data updates, forged genesis/reset, and key/epoch mismatch.
  • Any data intentionally left confidentiality-only is enumerated with a consumer-level integrity/freshness contract and explicit residual risk.
  • Software acceptance is green before operator-owned M7 storage qualification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity vulnerability or hardening

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions