Skip to content

timing.h timers wrap after 49 days on 32-bit and Windows systems #10613

@gilles-peskine-arm

Description

@gilles-peskine-arm

On platforms where long is a 32-bit type (which includes 64-bit Windows), the internal counter used by timers defined by mbedtls_timing_set_delay() and mbedtls_timing_get_delay() wrap after 2^32 milliseconds, which is about 49.7 days. You can only set a delay of at most 2^32 ms, but if you wait more than 2^32 ms to query the timer, it may or may not be expired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolved-after-3.6The issue is resolved in 4.1 onwards, but still present in 3.6 LTS.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions