Skip to content

Wrong variable in expiration check in oracle_attest_action::validate #3

@jubnzv

Description

@jubnzv

I'm evaluating a new security tool for Move that highlighted a variable misuse in one suspicious case.

Here it is:

  // check that the guardian is valid
  assert!(oracle.expiration_time_ms() > clock.timestamp_ms(), EGuardianInvalid);

Comment says "guardian", error says EGuardianInvalid, but code checks oracle. The other suspicious signs I found after manual evaluation:

  • guardian.expiration_time_ms is never checked in the source code
  • Other oracle.expiration_time_ms checks raise EOracleInvalid (here and here).

So, I suspect the warning is valid. It is likely a typo; should be guardian.expiration_time_ms() or comment/error is wrong.

Impact: the intended validation logic seems to not work as expected, but it is not exploitable because of min_attestations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions