Bug 3119

Summary: life (-t) argument wraps
Product: Portable OpenSSH Reporter: Per Modin <hello>
Component: ssh-addAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: dtucker
Priority: P5    
Version: 8.1p1   
Hardware: amd64   
OS: Linux   
Bug Depends on:    
Bug Blocks: 3117    
Attachments:
Description Flags
Restrict key lifetime to usable values (u32) none

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