Skip to content

time_jumps_validator counts a repeated Sync frame as a new valid frame #325

Open

Description

@mattday-etas

Description

Summary: The time jumps validator treats a re-delivered Sync frame as a new valid frame

Description: The daemon polls the slave's snapshot every cycle. If no new Sync arrives in that time, it gets the same Sync frame again. TimeJumpsValidator counts each delivery as another valid frame, so a time jump flag is cleared after valid_frames_threshold_ (2) deliveries instead of 2 new frames. For example, a jump to the future followed by the same frame delivered twice is cleared, although nothing new has been observed. Found while developing integration tests.

Root cause: In kTimeJumpHandling, SyncFramesHandler runs the jump check against last_sync_frame_ for every delivery (time_jumps_validator.cpp). An identical frame passes the check, because its T2 is not less than the previous T2. valid_frames_cnt_ is then incremented and the jump is cleared once the threshold is reached. Fix by comparing sync_fup_data.sequence_id with that of last_sync_frame_ and ignoring a repeat, so it is neither a valid frame nor a jump. A related gap: while in kIdle and kInitialSyncDebouncing, HandleIdleState and HandleInitialSyncDebouncingState pass upstream jump flags through unchanged (L110). A stale snapshot after a restart could therefore deliver a jump that the validator never validated. The validator should clear those flags in those two states.

Impact: Jump flags are cleared sooner than the requirement intends (two valid frames). Applications may resume trusting the time base while no new data has been verified.

Notification required: Yes. The safety manager, because the debounce of the time jump indication is a verification mechanism of the ASIL_B daemon.

Suggested classification: Major, deterministic.

Problem notifications

No response

Analysis results

No response

Solution

No response

Error Occurrence Rate

None

How to reproduce

No response

Supporting Information

No response

Classification

Major

First Affected Release

not released (main)

Last Affected Release

not released (main)

Expected Fixed Release

before release (main)

Category

  • Safety Relevant
  • Security Relevant
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

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions