core: timekeeper-era self-selection by attestation timestamp + skipped skew on conflict promotion lets revoked timekeepers attest and backdate lease times
Report
Summary
core/attestation.go:ValidateAttestationsAt buckets each attestation into a timekeeper era chosen by the attestation's own timestamp (sort.Search(eras[i].Since > a.Timestamp)-1, line ~134). The skew check (|a.Timestamp - now| <= MaxAttestationSkew, 10 min) is the only thing tying an attestation to the present — and on the conflict-promotion path the skew check is skipped:
quorum.go:391→dispatchValidateAndAdd(winnerBlock, true)andledger.go:3239(swap cascade winner) passskipTimestamp=true, which flows intovalidateAndAddLeaseAccept/Settle/ForceSettle/RenewasskipSkew=true→ValidateAttestationsAt(..., skipSkew=true).
Attack sequence
- A timekeeper key is revoked (removed from
sys.timekeepersin a newer era). - The old keyholder signs attestations for any lease transition with
Timestampset inside the old era (e.g. the era in which their key was trusted). - The block enters a conflict (any fork / competing block is enough).
- When the winner is promoted,
ValidateAttestationsAtruns withskipSkew=true; the self-chosen old timestamp buckets the attestations into the old era where the revoked key is still inConfig.Keys. Threshold counts against the old keyset, validation passes, and the median — a past timestamp — becomes the lease start / settle / renew time. - Result: (a) revoked timekeepers retain attestation authority indefinitely on the promotion path — the only path a conflict winner has; (b) lease
start_time/settle_timecan be backdated arbitrarily far (lease duration/billing and escrow expiry are computed from these times), purely by controlling fork timing.
The normal (non-conflict) path is protected by the skew check, so the exploit requires shepherding a lease block into a conflict — but conflicts are attacker-influencable (submit a competing double-spend block for the same account/previous), and promotion is the authoritative validation for winners.
Suggested fix
Do not let the attestation choose its own era when skew is skipped: clamp era selection by the current time (pick the era whose Since is latest ≤ now), or enforce a freshness bound on the median even when per-attestation skew is skipped, and/or pass skipSkew=false on the promotion path (the original block was already broadcast with real attestations).
Impact
Revoked-key attestation persistence + arbitrary backdating of lease times on the promotion path. High.
Novelty
Checked: XE-8797 (staged blocks skip attestations entirely — different path), XE-14251 (key normalization in counting), XE-0030 (rate-limit TOCTOU), XE-8075 (genesis skew) — none covers era self-selection via attestation timestamp combined with skipSkew on promotion.
Thread
Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-17969 and says what differs; it is read like any other.