Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent int64 overflow for default_lease_ttl and max_lease_ttl #14206

Merged
merged 3 commits into from Feb 23, 2022

Conversation

ccapurso
Copy link
Contributor

@ccapurso ccapurso commented Feb 22, 2022

It is possible for vault read sys/config/state/sanitized to result in int64 overflow for large values of default_lease_ttl and max_lease_ttl. This occurs in the duration parsing in humanDurationInt in base_helpers.go. In order to address this, the unit used has been changed from nanoseconds to seconds in core.Config.Sanitzed(). While this fixes the integer overflow issue, it also changes the contract of the API which is why the changelog lists a change instead of bug.

Fixes #14175.

@ccapurso ccapurso merged commit dee198e into main Feb 23, 2022
@ccapurso ccapurso deleted the issue-14175 branch February 23, 2022 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sys/config/state/sanitized returns lease TTLs in nanoseconds, so rendered incorrectly by Vault CLI
2 participants