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

fix: fix uint64->uint32 underflow issues resulting from using cosmossdk.io/math #293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 21, 2024

  1. fix: fix uint64->uint32 underflow issues resulting from using cosmoss…

    …dk.io/math
    
    This fixes potential security issues resulting from extraneous
    parsing that used cosmossdk.math.ParseUint which uses math/big.Int
    which is a big integer package and can allow uint64 in places
    where uint32 is used and there were underflow checks.
    The fix for this change was to simply use
    
        strconv.ParseUint(s, 10, BIT_SIZE)
    
    where BIT_SIZE is any of 32 or 64 bits for uint32 and uint64 respectively,
    and by extracting the shared code to an internal package.
    
    Fixes PeggyJV#292
    odeke-em committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    068f594 View commit details
    Browse the repository at this point in the history