Bugzilla – Bug 1208272
VUL-0: TRACKERBUG: CVE-2022-41725: go1.19,go1.20: net/http, mime/multipart: denial of service from excessive resource consumption
Last modified: 2024-05-06 08:14:08 UTC
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. 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. 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. Thanks to Ameya Darshan and Jakob Ackermann (@das7pad) for reporting this issue. This is CVE-2022-41725 and Go issue https://go.dev/issue/58006.
I can't find any packages embedding mime/multipart
This is an autogenerated message for OBS integration: This bug (1208272) was mentioned in https://build.opensuse.org/request/show/1066111 Factory / go1.19
SUSE-SU-2023:0735-1: An update that solves five vulnerabilities, contains one feature and has one fix can now be installed. Category: security (important) Bug References: 1206346, 1208269, 1208270, 1208271, 1208272, 1209030 CVE References: CVE-2022-41722, CVE-2022-41723, CVE-2022-41724, CVE-2022-41725, CVE-2023-24532 Jira References: PED-1962 Sources used: openSUSE Leap 15.4 (src): go1.20-1.20.2-150000.1.5.1 Development Tools Module 15-SP4 (src): go1.20-1.20.2-150000.1.5.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2023:0733-1: An update that solves five vulnerabilities and has one fix can now be installed. Category: security (important) Bug References: 1200441, 1208269, 1208270, 1208271, 1208272, 1209030 CVE References: CVE-2022-41722, CVE-2022-41723, CVE-2022-41724, CVE-2022-41725, CVE-2023-24532 Sources used: openSUSE Leap 15.4 (src): go1.19-1.19.7-150000.1.23.1 Development Tools Module 15-SP4 (src): go1.19-1.19.7-150000.1.23.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): go1.19-1.19.7-150000.1.23.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): go1.19-1.19.7-150000.1.23.1 SUSE Linux Enterprise Real Time 15 SP3 (src): go1.19-1.19.7-150000.1.23.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): go1.19-1.19.7-150000.1.23.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): go1.19-1.19.7-150000.1.23.1 SUSE Enterprise Storage 7.1 (src): go1.19-1.19.7-150000.1.23.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
This is an autogenerated message for OBS integration: This bug (1208272) was mentioned in https://build.opensuse.org/request/show/1072629 Factory / go1.18
SUSE-SU-2023:0869-1: An update that solves three vulnerabilities and has one fix can now be installed. Category: security (important) Bug References: 1208270, 1208271, 1208272, 1208491 CVE References: CVE-2022-41723, CVE-2022-41724, CVE-2022-41725 Sources used: openSUSE Leap 15.4 (src): go1.18-1.18.10-150000.1.46.1 Development Tools Module 15-SP4 (src): go1.18-1.18.10-150000.1.46.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): go1.18-1.18.10-150000.1.46.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): go1.18-1.18.10-150000.1.46.1 SUSE Linux Enterprise Real Time 15 SP3 (src): go1.18-1.18.10-150000.1.46.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): go1.18-1.18.10-150000.1.46.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): go1.18-1.18.10-150000.1.46.1 SUSE Enterprise Storage 7.1 (src): go1.18-1.18.10-150000.1.46.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2023:0871-1: An update that solves five vulnerabilities and has one fix can now be installed. Category: security (important) Bug References: 1200441, 1206134, 1208270, 1208271, 1208272, 1209030 CVE References: CVE-2022-41720, CVE-2022-41723, CVE-2022-41724, CVE-2022-41725, CVE-2023-24532 Sources used: Containers Module 15-SP4 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Enterprise Storage 7.1 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE Enterprise Storage 7 (src): container-suseconnect-2.4.0-150000.4.24.1 SUSE CaaS Platform 4.0 (src): container-suseconnect-2.4.0-150000.4.24.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2023:2312-1: An update that solves 28 vulnerabilities, contains one feature and has three fixes can now be installed. Category: security (important) Bug References: 1183043, 1193742, 1198423, 1198424, 1198427, 1199413, 1200134, 1200135, 1200136, 1200137, 1201434, 1201436, 1201437, 1201440, 1201443, 1201444, 1201445, 1201447, 1201448, 1202035, 1203185, 1204023, 1204024, 1204025, 1204941, 1206134, 1206135, 1208270, 1208271, 1208272, 1208491 CVE References: CVE-2022-1705, CVE-2022-1962, CVE-2022-24675, CVE-2022-27536, CVE-2022-27664, CVE-2022-28131, CVE-2022-28327, CVE-2022-2879, CVE-2022-2880, CVE-2022-29526, CVE-2022-29804, CVE-2022-30580, CVE-2022-30629, CVE-2022-30630, CVE-2022-30631, CVE-2022-30632, CVE-2022-30633, CVE-2022-30634, CVE-2022-30635, CVE-2022-32148, CVE-2022-32189, CVE-2022-41715, CVE-2022-41716, CVE-2022-41717, CVE-2022-41720, CVE-2022-41723, CVE-2022-41724, CVE-2022-41725 Jira References: PED-1962 Sources used: openSUSE Leap 15.4 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 openSUSE Leap 15.5 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 Development Tools Module 15-SP4 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 SUSE Linux Enterprise Real Time 15 SP3 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 SUSE Enterprise Storage 7.1 (src): go1.18-openssl-1.18.10.1-150000.1.9.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
done, closing