<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go, branch go1.24.9</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=go1.24.9</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=go1.24.9'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-10-13T21:14:38Z</updated>
<entry>
<title>[release-branch.go1.24] go1.24.9</title>
<updated>2025-10-13T21:14:38Z</updated>
<author>
<name>Gopher Robot</name>
<email>gobot@golang.org</email>
</author>
<published>2025-10-13T21:05:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8e10ef451a1b6a1e8861ced1154e1c3265bfa01b'/>
<id>urn:sha1:8e10ef451a1b6a1e8861ced1154e1c3265bfa01b</id>
<content type='text'>
Change-Id: I6deccf317a5f19ca9ee2a2eaddf65203ecfeb665
Reviewed-on: https://go-review.googlesource.com/c/go/+/711461
Auto-Submit: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Bypass: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] crypto/x509: rework fix for CVE-2025-58187</title>
<updated>2025-10-13T15:39:27Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2025-10-09T20:35:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ca6a5545ba18844a97c88a90a385eb6335bb7526'/>
<id>urn:sha1:ca6a5545ba18844a97c88a90a385eb6335bb7526</id>
<content type='text'>
In CL 709854 we enabled strict validation for a number of properties of
domain names (and their constraints). This caused significant breakage,
since we didn't previously disallow the creation of certificates which
contained these malformed domains.

Rollback a number of the properties we enforced, making domainNameValid
only enforce the same properties that domainToReverseLabels does. Since
this also undoes some of the DoS protections our initial fix enabled,
this change also adds caching of constraints in isValid (which perhaps
is the fix we should've initially chosen).

Updates #75835
Updates #75828
Fixes #75860

Change-Id: Ie6ca6b4f30e9b8a143692b64757f7bbf4671ed0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/710735
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
(cherry picked from commit 1cd71689f2ed8f07031a0cc58fc3586ca501839f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/710879
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] go1.24.8</title>
<updated>2025-10-07T18:17:23Z</updated>
<author>
<name>Gopher Robot</name>
<email>gobot@golang.org</email>
</author>
<published>2025-10-07T18:10:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3a666bca00d7fb30d55e252131ea2cf2006dc3a3'/>
<id>urn:sha1:3a666bca00d7fb30d55e252131ea2cf2006dc3a3</id>
<content type='text'>
Change-Id: Ib7865e22255a979da9552ffd35145bb9dd39b53f
Reviewed-on: https://go-review.googlesource.com/c/go/+/709896
TryBot-Bypass: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Auto-Submit: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] archive/tar: set a limit on the size of GNU sparse file 1.0 regions</title>
<updated>2025-10-07T18:01:00Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-09-11T20:32:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=613e746327381d820759ebea6ce722720b343556'/>
<id>urn:sha1:613e746327381d820759ebea6ce722720b343556</id>
<content type='text'>
Sparse files in tar archives contain only the non-zero components
of the file. There are several different encodings for sparse
files. When reading GNU tar pax 1.0 sparse files, archive/tar did
not set a limit on the size of the sparse region data. A malicious
archive containing a large number of sparse blocks could cause
archive/tar to read an unbounded amount of data from the archive
into memory.

Since a malicious input can be highly compressable, a small
compressed input could cause very large allocations.

Cap the size of the sparse block data to the same limit used
for PAX headers (1 MiB).

Thanks to Harshit Gupta (Mr HAX) (https://www.linkedin.com/in/iam-harshit-gupta/)
for reporting this issue.

Fixes CVE-2025-58183
For #75677
Fixes #75710

Change-Id: I70b907b584a7b8676df8a149a1db728ae681a770
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2800
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2967
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/709843
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] encoding/pem: make Decode complexity linear</title>
<updated>2025-10-07T18:00:57Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>bracewell@google.com</email>
</author>
<published>2025-09-30T18:16:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=74d4d836b91318a8764b94bc2b4b66ff599eb5f2'/>
<id>urn:sha1:74d4d836b91318a8764b94bc2b4b66ff599eb5f2</id>
<content type='text'>
Because Decode scanned the input first for the first BEGIN line, and
then the first END line, the complexity of Decode is quadratic. If the
input contained a large number of BEGINs and then a single END right at
the end of the input, we would find the first BEGIN, and then scan the
entire input for the END, and fail to parse the block, so move onto the
next BEGIN, scan the entire input for the END, etc.

Instead, look for the first END in the input, and then the first BEGIN
that precedes the found END. We then process the bytes between the BEGIN
and END, and move onto the bytes after the END for further processing.
This gives us linear complexity.

Fixes CVE-2025-61723
For #75676
Fixes #75708

Change-Id: I813c4f63e78bca4054226c53e13865c781564ccf
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2921
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2986
Reviewed-on: https://go-review.googlesource.com/c/go/+/709842
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] encoding/asn1: prevent memory exhaustion when parsing using internal/saferio</title>
<updated>2025-10-07T18:00:54Z</updated>
<author>
<name>Nicholas Husin</name>
<email>husin@google.com</email>
</author>
<published>2025-09-03T13:30:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=5c3d61c886f7ecfce9a6d6d3c97e6d5a8afb17d1'/>
<id>urn:sha1:5c3d61c886f7ecfce9a6d6d3c97e6d5a8afb17d1</id>
<content type='text'>
Within parseSequenceOf, reflect.MakeSlice is being used to pre-allocate
a slice that is needed in order to fully validate the given DER payload.
The size of the slice allocated are also multiple times larger than the
input DER:

- When using asn1.Unmarshal directly, the allocated slice is ~28x
  larger.
- When passing in DER using x509.ParseCertificateRequest, the allocated
  slice is ~48x larger.
- When passing in DER using ocsp.ParseResponse, the allocated slice is
  ~137x larger.

As a result, a malicious actor can craft a big empty DER payload,
resulting in an unnecessary large allocation of memories. This can be a
way to cause memory exhaustion.

To prevent this, we now use SliceCapWithSize within internal/saferio to
enforce a memory allocation cap.

Thanks to Jakub Ciolek for reporting this issue.

For #75671
Fixes #75704
Fixes CVE-2025-58185

Change-Id: Id50e76187eda43f594be75e516b9ca1d2ae6f428
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2700
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2984
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/709841
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] net/http: add httpcookiemaxnum GODEBUG option to limit number of cookies parsed</title>
<updated>2025-10-07T18:00:50Z</updated>
<author>
<name>Nicholas Husin</name>
<email>husin@google.com</email>
</author>
<published>2025-09-30T18:02:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c6b04dd33b0215f5deb83724661921842bf67607'/>
<id>urn:sha1:c6b04dd33b0215f5deb83724661921842bf67607</id>
<content type='text'>
When handling HTTP headers, net/http does not currently limit the number
of cookies that can be parsed. The only limitation that exists is for
the size of the entire HTTP header, which is controlled by
MaxHeaderBytes (defaults to 1 MB).

Unfortunately, this allows a malicious actor to send HTTP headers which
contain a massive amount of small cookies, such that as much cookies as
possible can be fitted within the MaxHeaderBytes limitation. Internally,
this causes us to allocate a massive number of Cookie struct.

For example, a 1 MB HTTP header with cookies that repeats "a=;" will
cause an allocation of ~66 MB in the heap. This can serve as a way for
malicious actors to induce memory exhaustion.

To fix this, we will now limit the number of cookies we are willing to
parse to 3000 by default. This behavior can be changed by setting a new
GODEBUG option: GODEBUG=httpcookiemaxnum. httpcookiemaxnum can be set to
allow a higher or lower cookie limit. Setting it to 0 will also allow an
infinite number of cookies to be parsed.

Thanks to jub0bs for reporting this issue.

For #75672
Fixes #75706
Fixes CVE-2025-58186

Change-Id: Ied58b3bc8acf5d11c880f881f36ecbf1d5d52622
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2720
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2983
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/709840
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] crypto/x509: improve domain name verification</title>
<updated>2025-10-07T18:00:47Z</updated>
<author>
<name>Neal Patel</name>
<email>nealpatel@google.com</email>
</author>
<published>2025-09-15T20:31:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f334417e71f8b078ad64035bddb6df7f8910da6c'/>
<id>urn:sha1:f334417e71f8b078ad64035bddb6df7f8910da6c</id>
<content type='text'>
Don't use domainToReverseLabels to check if domain names are valid,
since it is not particularly performant, and can contribute to DoS
vectors. Instead just iterate over the name and enforce the properties
we care about.

This also enforces that DNS names, both in SANs and name constraints,
are valid. We previously allowed invalid SANs, because some
intermediates had these weird names (see #23995), but there are
currently no trusted intermediates that have this property, and since we
target the web PKI, supporting this particular case is not a high
priority.

Thank you to Jakub Ciolek for reporting this issue.

Fixes CVE-2025-58187
For #75681
Fixes #75714

Change-Id: I6ebce847dcbe5fc63ef2f9a74f53f11c4c56d3d1
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2820
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2982
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/709839
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] net/url: enforce stricter parsing of bracketed IPv6 hostnames</title>
<updated>2025-10-07T18:00:42Z</updated>
<author>
<name>Ethan Lee</name>
<email>ethanalee@google.com</email>
</author>
<published>2025-08-29T17:35:55Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d6d2f7bf76718f1db05461cd912ae5e30d7b77ea'/>
<id>urn:sha1:d6d2f7bf76718f1db05461cd912ae5e30d7b77ea</id>
<content type='text'>
- Previously, url.Parse did not enforce validation of hostnames within
  square brackets.
- RFC 3986 stipulates that only IPv6 hostnames can be embedded within
  square brackets in a URL.
- Now, the parsing logic should strictly enforce that only IPv6
  hostnames can be resolved when in square brackets. IPv4, IPv4-mapped
  addresses and other input will be rejected.
- Update url_test to add test cases that cover the above scenarios.

Thanks to Enze Wang, Jingcheng Yang and Zehui Miao of Tsinghua
University for reporting this issue.

Fixes CVE-2025-47912
Fixes #75678
Fixes #75712

Change-Id: Iaa41432bf0ee86de95a39a03adae5729e4deb46c
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2680
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2968
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/709838
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.24] net/textproto: avoid quadratic complexity in Reader.ReadResponse</title>
<updated>2025-10-07T18:00:38Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-09-30T22:11:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a402f4ad285514f5f3db90516d72047d591b307a'/>
<id>urn:sha1:a402f4ad285514f5f3db90516d72047d591b307a</id>
<content type='text'>
Reader.ReadResponse constructed a response string from repeated
string concatenation, permitting a malicious sender to cause excessive
memory allocation and CPU consumption by sending a response consisting
of many short lines.

Use a strings.Builder to construct the string instead.

Thanks to Jakub Ciolek for reporting this issue.

Fixes CVE-2025-61724
For #75716
Fixes #75717

Change-Id: I1a98ce85a21b830cb25799f9ac9333a67400d736
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2940
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-by: Nicholas Husin &lt;husin@google.com&gt;
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2980
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/709837
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
</feed>
