Skip to content

MAX_XRPL_TIME inclusive range off-by-one (allows 2^32) #172

Description

@ckeshava

Description

MAX_XRPL_TIME = i64::pow(2, 32) combined with an inclusive upper range (0..=MAX_XRPL_TIME) allows a time of exactly 2^32. XRPL uses an unsigned 32-bit seconds-since-ripple-epoch, so the maximum valid value is 2^32 - 1.

Location

Impact / Severity

Medium — Boundary overflow.

Adversarial Agent Notes

Verdict: ACCEPT. Demonstrated by the failing unit test bug_5_24_max_xrpl_time_off_by_one.

Unit Test

#[test]
fn bug_5_24_max_xrpl_time_off_by_one() {
    let out_of_range: i64 = 1i64 << 32;
    assert!(ripple_time_to_posix(out_of_range).is_err());
}

Patch file: patches/per-bug/bug_5_24_max_xrpl_time.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI TriageIssue reported via AI-assisted analysis; needs human triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions