]> Cypherpunks.ru repositories - gostls13.git/commit
net: verify results from Lookup* are valid domain names
authorRoland Shoemaker <roland@golang.org>
Thu, 27 May 2021 17:40:06 +0000 (10:40 -0700)
committerRoland Shoemaker <roland@golang.org>
Thu, 27 May 2021 19:55:46 +0000 (19:55 +0000)
commitcdcd02842da7c004efd023881e3719105209c908
treea7b50659d1f8a3a01b328c07a5381e279a15dc16
parent8bf5bf51738a198902e03bbec7e6ff220f4cb002
net: verify results from Lookup* are valid domain names

For the methods LookupCNAME, LookupSRV, LookupMX, LookupNS, and
LookupAddr check that the returned domain names are in fact valid DNS
names using the existing isDomainName function.

Thanks to Philipp Jeitner and Haya Shulman from Fraunhofer SIT for
reporting this issue.

Fixes #46241
Fixes CVE-2021-33195

Change-Id: I47a4f58c031cb752f732e88bbdae7f819f0af4f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/323131
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
src/net/dnsclient_unix_test.go
src/net/lookup.go