]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] 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 20:29:21 +0000 (20:29 +0000)
commitdf6a737cc899507d3090e995abd1e1ed1a30cee3
tree552a858e7c24c05ebe51e26d26cb76b666b139c6
parent9210eaf7dc704612a6eda97c482012f779fd833b
[release-branch.go1.16] 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.

Updates #46241
Fixes #46357
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>
(cherry picked from commit cdcd02842da7c004efd023881e3719105209c908)
Reviewed-on: https://go-review.googlesource.com/c/go/+/323270
src/net/dnsclient_unix_test.go
src/net/lookup.go