Advisory

GO-2021-0347

Also known as: BIT-golang-2022-24921, CVE-2022-24921

Summary

Stack exhaustion when compiling deeply nested expressions in regexp

Details

On 64-bit platforms, an extremely deeply nested expression can cause regexp.Compile to cause goroutine stack exhaustion, forcing the program to exit. Note this applies to very large expressions, on the order of 2MB.

Severity

Not rated by the source.

Dates

Published
2022-05-23 22:15 UTC
Modified
2024-05-20 16:03 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.16.15, introduced 1.17.0-0, fixed 1.17.8 (semver)

Fixed versions

1.16.15, 1.17.8

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences