Skip to content

go/parser: stack exhaustion in all Parse* functions #53616

Closed
@tatianab

Description

@tatianab

Calling any of the Parse functions on Go source code which contains deeply nested types or declarations can cause a panic due to stack exhaustion.

Thanks to Juho Nurminen of Mattermost for reporting this issue.

This is CVE-2022-1962.

(This was a PRIVATE issue tracked in http://b/236145171 and fixed by http://tg/1491025.)

/cc https://github.com/orgs/golang/teams/security and https://github.com/orgs/golang/teams/release

Activity

added this to the Go1.19 milestone on Jun 29, 2022
tatianab

tatianab commented on Jul 6, 2022

@tatianab
Author

@gopherbot please open backport issues for this security fix

gopherbot

gopherbot commented on Jul 6, 2022

@gopherbot
Contributor

Backport issue(s) opened: #53707 (for 1.17), #53708 (for 1.18).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

gopherbot

gopherbot commented on Jul 12, 2022

@gopherbot
Contributor

Change https://go.dev/cl/417056 mentions this issue: [release-branch.go1.18] go/parser: limit recursion depth

gopherbot

gopherbot commented on Jul 12, 2022

@gopherbot
Contributor

Change https://go.dev/cl/417063 mentions this issue: go/parser: limit recursion depth

gopherbot

gopherbot commented on Jul 12, 2022

@gopherbot
Contributor

Change https://go.dev/cl/417070 mentions this issue: [release-branch.go1.17] go/parser: limit recursion depth

11 remaining items

Loading
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

    Status

    Done

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tatianab@gopherbot

        Issue actions

          go/parser: stack exhaustion in all Parse* functions · Issue #53616 · golang/go