中危 multipart 拒绝服务漏洞(CVE-2022-41725)
CVE编号
CVE-2022-41725利用情况
暂无补丁情况
官方补丁披露时间
2023-02-21漏洞描述
A denial of service is possible from excessive resource consumption in net/http and mime/multipart. Multipart form parsing with mime/multipart.Reader.ReadForm can consume largely unlimited amounts of memory and disk files. This also affects form parsing in the net/http package with the Request methods FormFile, FormValue, ParseMultipartForm, and PostFormValue. ReadForm takes a maxMemory parameter, and is documented as storing "up to maxMemory bytes +10MB (reserved for non-file parts) in memory". File parts which cannot be stored in memory are stored on disk in temporary files. The unconfigurable 10MB reserved for non-file parts is excessively large and can potentially open a denial of service vector on its own. However, ReadForm did not properly account for all memory consumed by a parsed form, such as map entry overhead, part names, and MIME headers, permitting a maliciously crafted form to consume well over 10MB. In addition, ReadForm contained no limit on the number of disk files created, permitting a relatively small request body to create a large number of disk temporary files. With fix, ReadForm now properly accounts for various forms of memory overhead, and should now stay within its documented limit of 10MB + maxMemory bytes of memory consumption. Users should still be aware that this limit is high and may still be hazardous. In addition, ReadForm now creates at most one on-disk temporary file, combining multiple form parts into a single temporary file. The mime/multipart.File interface type's documentation states, "If stored on disk, the File's underlying concrete type will be an *os.File.". This is no longer the case when a form contains more than one file part, due to this coalescing of parts into a single file. The previous behavior of using distinct files for each form part may be reenabled with the environment variable GODEBUG=multipartfiles=distinct. Users should be aware that multipart.ReadForm and the http.Request methods that call it do not limit the amount of disk consumed by temporary files. Callers can limit the size of form data with http.MaxBytesReader.解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
参考链接 |
|
---|---|
https://go.dev/cl/468124 | |
https://go.dev/issue/58006 | |
https://groups.google.com/g/golang-announce/c/V0aBFqaFs_E | |
https://pkg.go.dev/vuln/GO-2023-1569 | |
https://security.gentoo.org/glsa/202311-09 |
受影响软件情况
# | 类型 | 厂商 | 产品 | 版本 | 影响面 | ||||
1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
运行在以下环境 | |||||||||
应用 | golang | go | * | Up to (excluding) 1.19.6 | |||||
运行在以下环境 | |||||||||
应用 | golang | go | 1.20.0 | - | |||||
运行在以下环境 | |||||||||
系统 | alpine_3.17 | go | * | Up to (excluding) 1.19.6-r0 | |||||
运行在以下环境 | |||||||||
系统 | alpine_3.18 | go | * | Up to (excluding) 1.20.1-r0 | |||||
运行在以下环境 | |||||||||
系统 | alpine_edge | go | * | Up to (excluding) 1.20.1-r0 | |||||
运行在以下环境 | |||||||||
系统 | amazon_2 | golang | * | Up to (excluding) 1.6.19-1.amzn2.0.2 | |||||
运行在以下环境 | |||||||||
系统 | amazon_2023 | golang | * | Up to (excluding) 1.19.8-1.amzn2023.0.1 | |||||
运行在以下环境 | |||||||||
系统 | amazon_AMI | golang | * | Up to (excluding) 1.18.6-1.43.amzn1 | |||||
运行在以下环境 | |||||||||
系统 | debian_10 | golang-1.11 | * | Up to (including) 1.11.6-1+deb10u4 | |||||
运行在以下环境 | |||||||||
系统 | debian_11 | golang-1.15 | * | Up to (including) 1.15.15-1~deb11u4 | |||||
运行在以下环境 | |||||||||
系统 | debian_12 | golang-1.19 | * | Up to (excluding) 1.19.6-2 | |||||
运行在以下环境 | |||||||||
系统 | debian_sid | golang-1.19 | * | Up to (excluding) 1.19.6-2 | |||||
运行在以下环境 | |||||||||
系统 | fedora_EPEL_7 | golang | * | Up to (excluding) 1.19.6-1.el7 | |||||
运行在以下环境 | |||||||||
系统 | opensuse_Leap_15.4 | go1.19-doc | * | Up to (excluding) 1.18.10.1-150000.1.9.1 | |||||
运行在以下环境 | |||||||||
系统 | opensuse_Leap_15.5 | go1.18-openssl | * | Up to (excluding) 1.18.10.1-150000.1.9.1 | |||||
运行在以下环境 | |||||||||
系统 | oracle_8 | oraclelinux-release | * | Up to (excluding) 1.19.6-1.module+el8.8.0+21053+7bf42711 | |||||
运行在以下环境 | |||||||||
系统 | ubuntu_22.10 | golang-1.19 | * | Up to (excluding) 1.19.2-1ubuntu1.1 | |||||
运行在以下环境 | |||||||||
系统 | unionos_e | golang | * | Up to (excluding) golang-1.15.7-24.up1.uel20 | |||||
- 攻击路径 本地
- 攻击复杂度 复杂
- 权限要求 普通权限
- 影响范围 越权影响
- EXP成熟度 未验证
- 补丁情况 官方补丁
- 数据保密性 数据泄露
- 数据完整性 无影响
- 服务器危害 无影响
- 全网数量 N/A
CWE-ID | 漏洞类型 |
CWE-400 | 未加控制的资源消耗(资源穷尽) |
CWE-770 | 不加限制或调节的资源分配 |
Exp相关链接

版权声明
本站原创文章转载请注明文章出处及链接,谢谢合作!
评论