title: Infinite loop in parsing in go/scanner
description: Calling any of the Parse functions on Go source code which contains //line directives with very large line numbers can cause an infinite loop due to integer overflow.
problem types: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
affected:
{
vendor: Go standard library
product: go/scanner
collectionURL: https://pkg.go.dev
packageName: go/scanner
versions:
version: 0, lessThan: 1.19.8, status: affected, versionType: semver
version: 1.20.0-0, lessThan: 1.20.3, status: affected, versionType: semver
programRoutines:
name: Scanner.updateLineInfo
name: Scanner.Scan
defaultStatus: unaffected
}