Amazon Linux 2golang、 --advisory ALAS2-2025-3042 (ALAS-2025-3042)

high Nessus 插件 ID 271755

简介

远程 Amazon Linux 2 主机缺少安全更新。

描述

远程主机上安装的 golang 版本低于 1.24.8-1。因此,该软件受到 ALAS2-2025-3042 公告中提及的多个漏洞影响。

net/url对带括号的 IPv6 主机名验证不充分

URL 的主机组件中Parse 函数允许方括号中包含 IPv6 地址以外的值。RFC 3986 允许将 IPv6 地址包含在 host 组件内并括在方括号中。例如http://[::1]/。方括号内不得出现 IPv4 地址和主机名。Parse 未强制执行此要求。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75678NOTE:
https://github.com/golang/go/commit/9fd3ac8a10272afd90312fef5d379de7d688a58e (go1.25.2)注意
https://github.com/golang/go/commit/d6d2f7bf76718f1db05461cd912ae5e30d7b77ea (go1.24.8) (CVE-2025-47912)

archive/tar解析 GNU 稀疏映射时发生不受限制的分配

tar.Reader 未针对 GNU tar pax 1.0 稀疏文件中的稀疏区域数据块数量设置最大大小。包含大量稀疏区域的恶意构建的存档可导致读取器将无限量的数据从存档读取到内存中。从压缩源读取时较小的压缩输入可导致大型分配。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75677NOTE:
https://github.com/golang/go/commit/2612dcfd3cb6dd73c76e14a24fe1a68e2708e4e3 (go1.25.2)注意
https://github.com/golang/go/commit/613e746327381d820759ebea6ce722720b343556 (go1.24.8) (CVE-2025-58183)

encoding/asn1解析 DER 负载时预分配内存可导致内存耗尽

解析 DER 负载时在完全验证负载之前分配内存。这允许攻击者特制大型空 DER 负载以造成 asn1.Unmarshal、x509.ParseCertificateRequest 和 ocsp.ParseResponse 等函数耗尽内存。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75671NOTE:
https://github.com/golang/go/commit/e0f655bf3f96410f90756f49532bc6a1851855ca (go1.25.2)注意
https://github.com/golang/go/commit/5c3d61c886f7ecfce9a6d6d3c97e6d5a8afb17d1 (go1.24.8) (CVE-2025-58185)

net/http解析 cookie 时缺少限制可导致内存耗尽

尽管 HTTP 标头的默认限制为 1 MB但可解析的 Cookie 数量却没有限制。通过发送大量非常小的 Cookie 如 a=;攻击者可使 HTTP 服务器分配大量struct,造成大量内存消耗。

net/http 现在将接受的 Cookie 数量限制为 3000这可使用 httpcookiemaxnum GODEBUG 选项进行调整。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75672NOTE:
https://github.com/golang/go/commit/100c5a66802b5a895b1d0e5ed3b7918f899c4833 (go1.25.2)注意
https://github.com/golang/go/commit/c6b04dd33b0215f5deb83724661921842bf67607 (go1.24.8) (CVE-2025-58186)

crypto/x509检查名称限制时的二次方复杂性

由于名称限制检查算法的设计原因某些输入的处理时间相对于证书的大小呈线性关系。

这会影响用于验证任意证书链的程序。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75681NOTE:
https://github.com/golang/go/commit/f0c69db15aae2eb10bddd8b6745dff5c2932e8f5 (go1.25.2)注意
https://github.com/golang/go/commit/f334417e71f8b078ad64035bddb6df7f8910da6c (go1.24.8) (CVE-2025-58187)

crypto/x509使用 DSA 公钥验证证书时的错误

验证包含 DSA 公钥的证书链可造成程序错误这是由假设它们实现 Equal 方法的界面转换所导致。

这会影响用于验证任意证书链的程序。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75675NOTE:
https://github.com/golang/go/commit/930ce220d052d632f0d84df5850c812a77b70175 (go1.25.2)注意
https://github.com/golang/go/commit/f9f198ab05e3282cbf6b13251d47d9141981e401 (go1.24.8) (CVE-2025-58188)

crypto/tlsALPN 协商错误可包含任意文本

当 ALPN 协商失败时crypto/tls conn.Handshake 方法会在服务器端返回一个错误可能包含由连接的客户端提供的未转义的任意攻击者控制信息。

这会影响记录这些错误而未经任何其他形式的审查的程序并且可能允许将攻击者控制的信息注入日志。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75652NOTE:
https://github.com/golang/go/commit/205d0865958a6d2342939f62dfeaf47508101976 (go1.25.2)注意
https://github.com/golang/go/commit/2e1e356e33b9c792a9643749a7626a1789197bb9 (go1.24.8) (CVE-2025-58189)

编码/pem解析某些无效输入时的二次方复杂性

由于 PEM 解析功能的设计某些输入的处理时间相对于输入大小呈线性关系。

这会影响解析不受信任的 PEM 输入的程序。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75676NOTE:
https://github.com/golang/go/commit/90f72bd5001d0278949fab0b7a40f7d8c712979b (go1.25.2)注意
https://github.com/golang/go/commit/74d4d836b91318a8764b94bc2b4b66ff599eb5f2 (go1.24.8) (CVE-2025-61723)

net/textprotoReader.ReadResponse 中 CPU 消耗过多

Reader.ReadResponse 函数通过行的重复字符串连接构造响应字符串。当响应中的行数很大时这可能导致 CPU 消耗过多。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75716NOTE:
https://github.com/golang/go/commit/5d7a787aa2b486f77537eeaed9c38c940a7182b8 (go1.25.2)注意
https://github.com/golang/go/commit/a402f4ad285514f5f3db90516d72047d591b307a (go1.24.8) (CVE-2025-61724)

net/mailParseAddress 中 CPU 消耗过多

ParseAddress 函数通过重复的字符串连接构造域文字地址组件。当解析大型域文字组件时此问题可导致过量 CPU 消耗。

注意:https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI/m/qZN5nc-mBgAJNOTE:
https://github.com/golang/go/issues/75680NOTE:
https://github.com/golang/go/commit/6a057327cf9a405e6388593dd4aedc0d0da77092 (go1.25.2)注意
https://github.com/golang/go/commit/bc6981fd74024098185a23ba3a83a81ed68a06c9 (go1.24.8) (CVE-2025-61725)

Tenable 已直接从测试产品的安全公告中提取上述描述块。

请注意,Nessus 尚未测试这些问题,而是只依据应用程序自我报告的版本号进行判断。

解决方案

运行“yum update golang”或“yum update --advisory ALAS2-2025-3042”以更新系统。

另见

https://alas.aws.amazon.com//AL2/ALAS2-2025-3042.html

https://alas.aws.amazon.com/faqs.html

https://explore.alas.aws.amazon.com/CVE-2025-47912.html

https://explore.alas.aws.amazon.com/CVE-2025-58183.html

https://explore.alas.aws.amazon.com/CVE-2025-58185.html

https://explore.alas.aws.amazon.com/CVE-2025-58186.html

https://explore.alas.aws.amazon.com/CVE-2025-58187.html

https://explore.alas.aws.amazon.com/CVE-2025-58188.html

https://explore.alas.aws.amazon.com/CVE-2025-58189.html

https://explore.alas.aws.amazon.com/CVE-2025-61723.html

https://explore.alas.aws.amazon.com/CVE-2025-61724.html

https://explore.alas.aws.amazon.com/CVE-2025-61725.html

插件详情

严重性: High

ID: 271755

文件名: al2_ALAS-2025-3042.nasl

版本: 1.1

类型: local

代理: unix

发布时间: 2025/10/28

最近更新时间: 2025/10/28

支持的传感器: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Continuous Assessment, Nessus

风险信息

VPR

风险因素: Medium

分数: 6.0

CVSS v2

风险因素: High

基本分数: 8.5

时间分数: 6.3

矢量: CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:C

CVSS 分数来源: CVE-2025-47912

CVSS v3

风险因素: High

基本分数: 8.2

时间分数: 7.1

矢量: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

时间矢量: CVSS:3.0/E:U/RL:O/RC:C

漏洞信息

CPE: p-cpe:/a:amazon:linux:golang-bin, cpe:/o:amazon:linux:2, p-cpe:/a:amazon:linux:golang-tests, p-cpe:/a:amazon:linux:golang, p-cpe:/a:amazon:linux:golang-misc, p-cpe:/a:amazon:linux:golang-docs, p-cpe:/a:amazon:linux:golang-shared, p-cpe:/a:amazon:linux:golang-src

必需的 KB 项: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

易利用性: No known exploits are available

补丁发布日期: 2025/10/27

漏洞发布日期: 2025/10/23

参考资料信息

CVE: CVE-2025-47912, CVE-2025-58183, CVE-2025-58185, CVE-2025-58186, CVE-2025-58187, CVE-2025-58188, CVE-2025-58189, CVE-2025-61723, CVE-2025-61724, CVE-2025-61725

IAVB: 2025-B-0177