Mageia 2021-0369: golang security update | LinuxSecurity.com

Advisories

MGASA-2021-0369 - Updated golang packages fix security vulnerabilities

Publication date: 25 Jul 2021
URL: https://advisories.mageia.org/MGASA-2021-0369.html
Type: security
Affected Mageia releases: 8
CVE: CVE-2021-27918,
     CVE-2021-31525,
     CVE-2021-33195,
     CVE-2021-33196,
     CVE-2021-33197,
     CVE-2021-33198,
     CVE-2021-34558

encoding/xml in Go before 1.15.9 and 1.16.x before 1.16.1 has an infinite loop
if a custom TokenReader (for xml.NewTokenDecoder) returns EOF in the middle of
an element. This can occur in the Decode, DecodeElement, or Skip method
(CVE-2021-27918).

net/http in Go before 1.15.12 and 1.16.x before 1.16.4 allows remote attackers
to cause a denial of service (panic) via a large header to ReadRequest or
ReadResponse. Server, Transport, and Client can each be affected in some
configurations (CVE-2021-31525).

A security issue has been found in Go before version 1.16.5. The LookupCNAME,
LookupSRV, LookupMX, LookupNS, and LookupAddr functions in net, and their
respective methods on the Resolver type may return arbitrary values retrieved
from DNS which do not follow the established RFC 1035 rules for domain names.
If these names are used without further sanitization, for instance unsafely
included in HTML, they may allow for injection of unexpected content. Note
that LookupTXT may still return arbitrary values that could require
sanitization before further use (CVE-2021-33195).

A security issue has been found in Go. Due to a pre-allocation optimization in
zip.NewReader, a malformed archive which indicates it has a significant number
of files can cause either a panic or memory exhaustion (CVE-2021-33196).

ReverseProxy fails to delete the Connection headers (as well as other legacy
hop-by-hop headers, which however per RFC 7230 need to also be specified in
Connection) if there are multiple ones and the first is empty, due to an
incorrect Get(h) == "" check. This can lead to a security issue if the proxy
is adding an important header, like X-Forwarded-For, and is sitting in front
of another proxy which can be instructed by an attacker to drop that header as
a hop-by-hop header (CVE-2021-33197).

A security issue has been found in Go before version 1.16.5. The SetString and
UnmarshalText methods of math/big.Rat may cause a panic or an unrecoverable
fatal error if passed inputs with very large exponents (CVE-2021-33198).

The crypto/tls package of Go through 1.16.5 does not properly assert that the
type of public key in an X.509 certificate matches the expected type when
doing a RSA based key exchange, allowing a malicious TLS server to cause a TLS
client to panic (CVE-2021-34558).

References:
- https://bugs.mageia.org/show_bug.cgi?id=29037
- https://lists.opensuse.org/archives/list/[email protected]/thread/EXHOWUQKHNS4LEJ2GTYWY2EEAYVCKECW/
- https://lists.opensuse.org/archives/list/[email protected]/thread/4PG5AXR4LXEWYU5DHYEVESCXWKO3HFHO/
- https://lists.fedoraproject.org/archives/list/[email protected]/thread/QLUQXBCOPWP72ZSS3SM3CTURM7XOYALQ/
- https://lists.opensuse.org/archives/list/[email protected]/thread/AKQH4LHYIFOWBEGMGHD7S7TTV7JL4U7W/
- https://lists.opensuse.org/archives/list/[email protected]/thread/OZJXXUXBI66VV2PXRNAWN4MCE3AOHNBA/
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27918
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-31525
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33195
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33196
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33197
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33198
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34558

SRPMS:
- 8/core/golang-1.15.14-1.mga8

Mageia 2021-0369: golang security update

encoding/xml in Go before 1.15.9 and 1.16.x before 1.16.1 has an infinite loop if a custom TokenReader (for xml.NewTokenDecoder) returns EOF in the middle of an element

Summary

encoding/xml in Go before 1.15.9 and 1.16.x before 1.16.1 has an infinite loop if a custom TokenReader (for xml.NewTokenDecoder) returns EOF in the middle of an element. This can occur in the Decode, DecodeElement, or Skip method (CVE-2021-27918).
net/http in Go before 1.15.12 and 1.16.x before 1.16.4 allows remote attackers to cause a denial of service (panic) via a large header to ReadRequest or ReadResponse. Server, Transport, and Client can each be affected in some configurations (CVE-2021-31525).
A security issue has been found in Go before version 1.16.5. The LookupCNAME, LookupSRV, LookupMX, LookupNS, and LookupAddr functions in net, and their respective methods on the Resolver type may return arbitrary values retrieved from DNS which do not follow the established RFC 1035 rules for domain names. If these names are used without further sanitization, for instance unsafely included in HTML, they may allow for injection of unexpected content. Note that LookupTXT may still return arbitrary values that could require sanitization before further use (CVE-2021-33195).
A security issue has been found in Go. Due to a pre-allocation optimization in zip.NewReader, a malformed archive which indicates it has a significant number of files can cause either a panic or memory exhaustion (CVE-2021-33196).
ReverseProxy fails to delete the Connection headers (as well as other legacy hop-by-hop headers, which however per RFC 7230 need to also be specified in Connection) if there are multiple ones and the first is empty, due to an incorrect Get(h) == "" check. This can lead to a security issue if the proxy is adding an important header, like X-Forwarded-For, and is sitting in front of another proxy which can be instructed by an attacker to drop that header as a hop-by-hop header (CVE-2021-33197).
A security issue has been found in Go before version 1.16.5. The SetString and UnmarshalText methods of math/big.Rat may cause a panic or an unrecoverable fatal error if passed inputs with very large exponents (CVE-2021-33198).
The crypto/tls package of Go through 1.16.5 does not properly assert that the type of public key in an X.509 certificate matches the expected type when doing a RSA based key exchange, allowing a malicious TLS server to cause a TLS client to panic (CVE-2021-34558).

References

- https://bugs.mageia.org/show_bug.cgi?id=29037

- https://lists.opensuse.org/archives/list/[email protected]/thread/EXHOWUQKHNS4LEJ2GTYWY2EEAYVCKECW/

- https://lists.opensuse.org/archives/list/[email protected]/thread/4PG5AXR4LXEWYU5DHYEVESCXWKO3HFHO/

- https://lists.fedoraproject.org/archives/list/[email protected]/thread/QLUQXBCOPWP72ZSS3SM3CTURM7XOYALQ/

- https://lists.opensuse.org/archives/list/[email protected]/thread/AKQH4LHYIFOWBEGMGHD7S7TTV7JL4U7W/

- https://lists.opensuse.org/archives/list/[email protected]/thread/OZJXXUXBI66VV2PXRNAWN4MCE3AOHNBA/

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27918

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-31525

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33195

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33196

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33197

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33198

- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34558

Resolution

MGASA-2021-0369 - Updated golang packages fix security vulnerabilities

SRPMS

- 8/core/golang-1.15.14-1.mga8

Severity
Publication date: 25 Jul 2021
URL: https://advisories.mageia.org/MGASA-2021-0369.html
Type: security
CVE: CVE-2021-27918, CVE-2021-31525, CVE-2021-33195, CVE-2021-33196, CVE-2021-33197, CVE-2021-33198, CVE-2021-34558

We use cookies to provide and improve our services. By using our site, you consent to our Cookie Policy.