Skip to content

sudo parses large integer timestamp_timeout incorrectly. #1048

Closed
@squell

Description

@squell

Describe the bug
If you set timestamp_timeout to a very large value (but within the 18 decimal limit), sudo-rs will panic in debug mode and truncate the timeout to a wrong value in release mode.

To Reproduce
Build sudo + visudo in debug mode, run sudo visudo (ours) and try adding Defaults timestamp_timeout = 157680000000000000. Visudo will fail with a panic.

Expected behavior
Give a parse error.

Context
Caught while proposing a work-around for #1032

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions