<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/archive/tar/reader_test.go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-02-03T11:04:30Z</updated>
<entry>
<title>all: prealloc slice with possible minimum capabilities</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2024-10-25T17:48:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=011e40da85bddf83fee0ded83cb9115b7a88b3d4'/>
<id>urn:sha1:011e40da85bddf83fee0ded83cb9115b7a88b3d4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: fix some minor grammatical issues in the comments</title>
<updated>2025-12-30T15:28:53Z</updated>
<author>
<name>cuishuang</name>
<email>imcusg@gmail.com</email>
</author>
<published>2025-12-18T02:36:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=fd45d70799853ef5980a559e206353574108d8da'/>
<id>urn:sha1:fd45d70799853ef5980a559e206353574108d8da</id>
<content type='text'>
Change-Id: I0459f05e7f6abd9738813c65d993114e931720d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/731000
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Keith Randall &lt;khr@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
Auto-Submit: Keith Randall &lt;khr@golang.org&gt;
</content>
</entry>
<entry>
<title>archive/tar, compress/bzip2: base64 some troublesome testdata files</title>
<updated>2025-12-15T16:34:13Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2025-12-12T22:18:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6713f46426c70f601ac33471d16be7b0e1aae349'/>
<id>urn:sha1:6713f46426c70f601ac33471d16be7b0e1aae349</id>
<content type='text'>
This avoids complaints from scanners that look for and open
tar and bz2 files, and complain if they look weird.
In this case, they do look weird, because they are intentionally strange.
This kind of thing shouldn't be necessary, but we already have the machinery
to do it so it's easy enough.

Fixes #76799

Change-Id: Ib302b3aef30108a1325f91fcb2d166f8e1863792
Reviewed-on: https://go-review.googlesource.com/c/go/+/729780
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
</content>
</entry>
<entry>
<title>archive/tar: set a limit on the size of GNU sparse file 1.0 regions</title>
<updated>2025-10-07T19:46:36Z</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=f7a68d3804efabd271f0338391858bc1e7e57422'/>
<id>urn:sha1:f7a68d3804efabd271f0338391858bc1e7e57422</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
Fixes #75677

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-review.googlesource.com/c/go/+/709861
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Bypass: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>archive/tar: use hash/crc32 instead of crypto/md5 for test checksums</title>
<updated>2024-10-03T15:48:09Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2024-10-03T07:34:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=722ecf34474a33663f69220838af8c715185b5b7'/>
<id>urn:sha1:722ecf34474a33663f69220838af8c715185b5b7</id>
<content type='text'>
Using MD5 for checksums in tests is an overkill, as MD5 is designed for
cryptographic purposes. Use hash/crc32 instead, which is designed for
detecting random data corruptions, aka checksums.

Change-Id: I03b30ed7f38fba2a2e59d06bd4133b495f64a013
Reviewed-on: https://go-review.googlesource.com/c/go/+/617675
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
</content>
</entry>
<entry>
<title>archive: use slices and maps to clean up tests</title>
<updated>2024-07-25T00:25:45Z</updated>
<author>
<name>apocelipes</name>
<email>seve3r@outlook.com</email>
</author>
<published>2024-07-24T10:24:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bd6f911f852f4a608e2cf11c1ce5b55ff0347866'/>
<id>urn:sha1:bd6f911f852f4a608e2cf11c1ce5b55ff0347866</id>
<content type='text'>
Replace reflect.DeepEqual with slices.Equal/maps.Equal, which is
much faster.

Clean up some unnecessary helper functions.

Change-Id: I9b94bd43886302b9b327539ab065a435ce0d75d9
GitHub-Last-Rev: b9ca21f165bcc5e45733e6a511a2344b1aa4a281
GitHub-Pull-Request: golang/go#67607
Reviewed-on: https://go-review.googlesource.com/c/go/+/587936
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
</content>
</entry>
<entry>
<title>archive/tar, archive/zip: disable insecure file name checks with GODEBUG</title>
<updated>2022-11-21T21:14:38Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-11-21T19:32:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=85a2c19b328081c3fbcd1fa3db9a56d708a25c68'/>
<id>urn:sha1:85a2c19b328081c3fbcd1fa3db9a56d708a25c68</id>
<content type='text'>
Add GODEBUG=tarinsecurepath=1 and GODEBUG=zipinsecurepath=1 settings
to disable file name validation.

For #55356.

Change-Id: Iaacdc629189493e7ea3537a81660215a59dd40a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/452495
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Heschi Kreinick &lt;heschi@google.com&gt;
</content>
</entry>
<entry>
<title>archive/tar, archive/zip: return ErrInsecurePath for unsafe paths</title>
<updated>2022-11-16T23:36:48Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-09-22T23:22:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a2d8157a7ecc8c7a91c93182ae4778aef505677e'/>
<id>urn:sha1:a2d8157a7ecc8c7a91c93182ae4778aef505677e</id>
<content type='text'>
Return a distinguishable error when reading an archive file
with a path that is:

	- absolute
	- escapes the current directory (../a)
	- on Windows, a reserved name such as NUL

Users may ignore this error and proceed if they do not need name
sanitization or intend to perform it themselves.

Fixes #25849
Fixes #55356

Change-Id: Ieefa163f00384bc285ab329ea21a6561d39d8096
Reviewed-on: https://go-review.googlesource.com/c/go/+/449937
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>archive/tar: limit size of headers</title>
<updated>2022-10-05T20:40:43Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-09-03T03:45:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0bf7ee9977c0218562c50a0b0f0d9cbdf33f65e6'/>
<id>urn:sha1:0bf7ee9977c0218562c50a0b0f0d9cbdf33f65e6</id>
<content type='text'>
Set a 1MiB limit on special file blocks (PAX headers, GNU long names,
GNU link names), to avoid reading arbitrarily large amounts of data
into memory.

Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting
this issue.

Fixes CVE-2022-2879
For #54853

Change-Id: I85136d6ff1e0af101a112190e027987ab4335680
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1565555
Reviewed-by: Tatiana Bradley &lt;tatianabradley@google.com&gt;
Run-TryBot: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/439355
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Run-TryBot: Roland Shoemaker &lt;roland@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>archive/tar: delete unreachable continue code</title>
<updated>2022-08-17T03:03:59Z</updated>
<author>
<name>Abirdcfly</name>
<email>fp544037857@gmail.com</email>
</author>
<published>2022-08-09T07:04:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=71424806fa76d5b5d1b2492741d2564664af136c'/>
<id>urn:sha1:71424806fa76d5b5d1b2492741d2564664af136c</id>
<content type='text'>
Change-Id: Id492ee4e614a38880a6a5830371dcd9a8b37129a
Reviewed-on: https://go-review.googlesource.com/c/go/+/422214
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: hopehook &lt;hopehook@qq.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: hopehook &lt;hopehook@qq.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
</feed>
