Bug 3119 - life (-t) argument wraps
Summary: life (-t) argument wraps
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-add (show other bugs)
Version: 8.1p1
Hardware: amd64 Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_3
  Show dependency treegraph
 
Reported: 2020-02-12 03:03 AEDT by Per Modin
Modified: 2021-03-04 09:53 AEDT (History)
1 user (show)

See Also:


Attachments
Restrict key lifetime to usable values (u32) (2.06 KB, patch)
2020-02-18 20:02 AEDT, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Modin 2020-02-12 03:03:59 AEDT
It seems that the life argument is not parsed correctly.

From discussion on IRC it seems that ssh-add.c#L722 and misc.c#L494 are good sources.


```
$ ssh-add -t 999999999999999999
Identity added: /home/modin/.ssh/id_rsa (/home/modin/.ssh/id_rsa)
Lifetime set to -1486618625 seconds
```

running Arch Linux, openssh v 8.1p1-2.
Comment 1 Per Modin 2020-02-12 03:14:36 AEDT
created downstream issue https://bugs.archlinux.org/task/65459
Comment 2 Darren Tucker 2020-02-18 20:02:18 AEDT
Created attachment 3357 [details]
Restrict key lifetime to usable values (u32)

We have just committed this patch, which should address this issue and will be in the 8.3 release.  Thanks for the report.

$ ssh-add -t 999999999999999999
Invalid lifetime
Comment 3 Damien Miller 2021-03-04 09:53:22 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle