mirror of https://github.com/golang/go.git
mime/multipart.Reader.ReadForm allows specifying the maximum amount of memory that will be consumed by the form. While this limit is correctly applied to the parsed form data structure, it was not being applied to individual header lines in a form. For example, when presented with a form containing a header line that never ends, ReadForm will continue to read the line until it runs out of memory. Limit the amount of data consumed when reading a header. Fixes CVE-2023-45290 Fixes #65383 Change-Id: I7f9264d25752009e95f6b2c80e3d76aaf321d658 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2134435 Reviewed-by: Roland Shoemaker <bracewell@google.com> Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/569341 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> |
||
|---|---|---|
| .. | ||
| multipart | ||
| quotedprintable | ||
| testdata | ||
| encodedword.go | ||
| encodedword_test.go | ||
| example_test.go | ||
| grammar.go | ||
| mediatype.go | ||
| mediatype_test.go | ||
| type.go | ||
| type_dragonfly.go | ||
| type_freebsd.go | ||
| type_openbsd.go | ||
| type_plan9.go | ||
| type_test.go | ||
| type_unix.go | ||
| type_unix_test.go | ||
| type_windows.go | ||