]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] 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:16 +0000 (20:29 +0000)
commit31d60cda1f58b7558fc5725d2b9e4531655d980e
treeabe3b35f2a3e7d7b4a14ed712cf30d8b7c5136df
parentdf9ce19db6df32d94eae8760927bdfbc595433c3
[release-branch.go1.15] 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 #46356
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/+/323269
src/net/dnsclient_unix_test.go
src/net/lookup.go