Skip to content

gossip: NodeAnnounceBody.timestamp_us is a self-reported wall-clock value with no upper bound on skew accepted by the validation layer, enabling future-dated announces to permanently poison a peer-table entry #298

Closed

Description

@alpergundogdu

The validation module checks that timestamp_us is not too far in the past but does not reject announces whose timestamp is significantly ahead of the receiver's wall clock. A malicious node can publish an announce timestamped far in the future, blocking any genuine refresh from that node ID until wall-clock catches up.


Filed via GitDailyReporterBot

Activity

  1. added
    kind:bug
    kind:security
    prio:high
    on Apr 24, 2026
  2. alpergundogdu commented on Apr 24, 2026

    @alpergundogdu
    ContributorAuthor

    Closing — this is already handled in the current codebase.

    crates/gossip/src/validation.rs computes an absolute difference between the receiver's clock and the announced timestamp:

    let diff = i128::from(now_us) - i128::from(b.timestamp_us);
    let abs_diff = u64::try_from(diff.unsigned_abs()).unwrap_or(u64::MAX);
    if abs_diff > CLOCK_SKEW_TOLERANCE_US {
        return Err(AnnounceReject::ClockSkew);
    }

    This rejects announces whose timestamp is more than 60 seconds from the receiver's wall clock in either direction (past or future). The clock_skew_future_rejected test explicitly covers the future-dated scenario described in this issue.

    A malicious node publishing a far-future timestamp will be rejected with AnnounceReject::ClockSkew before it ever reaches the peer table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugkind:securityprio:high

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions