Integrity MAC depends on unordered SQLite row ordering #69

Closed
opened 2026-04-05 16:23:10 +00:00 by Skipper · 1 comment
Owner

Info

Severity: LOW
Attack vector: offline

Impact

Can cause spurious integrity verification failures and deny service, even when the underlying data is logically unchanged.

Description

Entity verification serializes vectors such as targets and volume rate limits using the order returned from SQLite. Some of those rows are fetched without an explicit ORDER BY, so logically identical data may be serialized in a different order and produce a different MAC.

Example flow

  1. Read or reconstruct logically identical rows in a different database order.
  2. Serialize the entity into postcard format.
  3. Verify the MAC against the original envelope.
  4. Fail verification because the vector ordering changed.

Mitigation

Sort the relevant collections before serialization or add explicit ORDER BY clauses to every query that feeds MAC-protected vectors.

# Info **Severity**: **LOW** Attack vector: offline ## Impact Can cause spurious integrity verification failures and deny service, even when the underlying data is logically unchanged. ## Description Entity verification serializes vectors such as targets and volume rate limits using the order returned from SQLite. Some of those rows are fetched without an explicit `ORDER BY`, so logically identical data may be serialized in a different order and produce a different MAC. ## Example flow 1. Read or reconstruct logically identical rows in a different database order. 2. Serialize the entity into postcard format. 3. Verify the MAC against the original envelope. 4. Fail verification because the vector ordering changed. ## Mitigation Sort the relevant collections before serialization or add explicit `ORDER BY` clauses to every query that feeds MAC-protected vectors.
Skipper self-assigned this 2026-04-06 13:40:01 +00:00
Author
Owner

#77

#77
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#69