Skip to content

math/big: Rat.SetString may consume large amount of RAM and crash #50699

Description

@katiehockman

Unmarshaling a string into a *Rat may cause resource exhaustion, consuming a huge amount of RAM, which may cause a system to crash or timeout. This is reachable from (*Rat).SetString, (*Rat).UnmarshalText, (*Rat).Scan, and any other function that unmarshals a string into a (*Rat) such as constant.MakeFromLiteral.

Thanks to the OSS-Fuzz project for discovering this issue and to Emmanuel Odeke for reporting it.

This is CVE-2022-23772.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions