-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
x/gov/client/cli: integer overflow from ignoring output of strconv.Atoi #13346
Labels
S:orijtech
Squad: OrijTech
Comments
odeke-em
added a commit
that referenced
this issue
Sep 20, 2022
…alues Reported by cosmos/gosec in https://github.com/cosmos/cosmos-sdk/security/code-scanning/5730. This change checks for errors from strconv.Atoi in which case we were susceptible to out of range errors, this change also adds tests to prevent regressions. Fixes #13346
odeke-em
added a commit
that referenced
this issue
Sep 20, 2022
…alues (#13347) Reported by cosmos/gosec in https://github.com/cosmos/cosmos-sdk/security/code-scanning/5730. This change checks for errors from strconv.Atoi in which case we were susceptible to out of range errors, this change also adds tests to prevent regressions. Fixes #13346
odeke-em
added a commit
that referenced
this issue
Sep 20, 2022
…alues Reported by cosmos/gosec in https://github.com/cosmos/cosmos-sdk/security/code-scanning/5730. This change checks for errors from strconv.Atoi in which case we were susceptible to out of range errors, this change also adds tests to prevent regressions. Fixes #13346
odeke-em
added a commit
that referenced
this issue
Sep 21, 2022
…Parse tests Uses strconv.ParseInt(s, 10, 0) where 0 as the bitSize lets the system determine the bitSize to parse int into its range. Adds more rigorous checks to ensure that the output is as expected with range failures. While here also added control tests to ensure that we can parse integers within range of int. Updates #13346
odeke-em
added a commit
that referenced
this issue
Sep 21, 2022
Adds more rigorous checks to ensure that the output is as expected with range failures. While here also added control tests to ensure that we can parse integers within range of int. Updates #13346
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of Bug
Reported by cosmos/gosec in https://github.com/cosmos/cosmos-sdk/security/code-scanning/5730; on further inspection it does indeed turn out to be a bug as an overflow per this repro
Version
79f277c
Fix
The text was updated successfully, but these errors were encountered: