We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CreateNonMembershipProof/CreateMembershipProof does not validate the key before calling sdkmaps.ProofsFromMap, so they can panic with empty key.
sdkmaps.ProofsFromMap
4f4c035
package main import ( "fmt" "github.com/cosmos/cosmos-sdk/store/internal/proofs" ) func main() { icp, err := proofs.CreateNonMembershipProof(map[string][]byte{``: nil}, []byte(` `)) if err != nil { panic(err) } fmt.Println(icp) }
package main import ( "fmt" "github.com/cosmos/cosmos-sdk/store/internal/proofs" ) func main() { icp, err := proofs.CreateMembershipProof(map[string][]byte{``: nil}, []byte(``)) if err != nil { panic(err) } fmt.Println(icp) }
Discover by https://oss-fuzz.com/testcase-detail/4647668077953024
The text was updated successfully, but these errors were encountered:
cc @odeke-em
Sorry, something went wrong.
store/internal: validate keys before calling ProofsFromMap (#9235)
711976e
Otherwise, an empty key as input or present in data can cause a panic at runtime. Caught by oss-fuzz: https://oss-fuzz.com/testcase-detail/4647668077953024 Fixes #9233
51737da
Otherwise, an empty key as input or present in data can cause a panic at runtime. Caught by oss-fuzz: https://oss-fuzz.com/testcase-detail/4647668077953024 Fixes #9233 (cherry picked from commit 711976e) # Conflicts: # CHANGELOG.md
store/internal: validate keys before calling ProofsFromMap (backport #…
81b1049
…9235) (#9247) Fixes #9233 (cherry picked from commit 711976e) Co-authored-by: Cuong Manh Le <cuong@orijtech.com> Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Successfully merging a pull request may close this issue.
Summary of Bug
CreateNonMembershipProof/CreateMembershipProof does not validate the key before calling
sdkmaps.ProofsFromMap
, so they can panic with empty key.Version
4f4c035
Steps to Reproduce
Discover by https://oss-fuzz.com/testcase-detail/4647668077953024
For Admin Use
The text was updated successfully, but these errors were encountered: