1
- From e429b5038a364cbe0c9737cf6d21fba2c37a5b1c Mon Sep 17 00:00:00 2001
1
+ From 18bab2267ddb865bbff5f778bf60a115b145bd74 Mon Sep 17 00:00:00 2001
2
2
From: Damien Neil <
[email protected] >
3
3
Date: Fri, 2 Sep 2022 20:45:18 -0700
4
- Subject: [PATCH] [go-1.15.15-eks] archive/tar: limit size of
5
- headers
4
+ Subject: [PATCH] [release-branch.go1.18] archive/tar: limit size of headers
6
5
7
6
# AWS EKS
8
7
Backported To: go-1.15.15-eks
@@ -12,6 +11,11 @@ Backported From: release-branch.go1.15
12
11
Source Commit: https://github.com/golang/go/commit/0a723816cd205576945fa57fbdde7e6532d59d08
13
12
EKS Patch Source Commit:
14
13
14
+ For building an internal version of go1.15, we removed the binary
15
+ information from this patch caused by ./src/archive/tar/pax-bad-hdr-large.tar.bz2
16
+ it was added to the repo:
17
+ https://github.com/aws/eks-distro-build-tooling/projects/golang/go/1.15/rpmbuild/SOURCE/pax-bad-hdr-large.tar.bz2
18
+
15
19
# Originial Information
16
20
17
21
Set a 1MiB limit on special file blocks (PAX headers, GNU long names,
@@ -66,7 +70,7 @@ index cfe24a5e1d..6642364de1 100644
66
70
67
71
// blockPadding computes the number of bytes needed to pad offset up to the
68
72
diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go
69
- index 4f9135b791..d964c3b6b3 100644
73
+ index 4f9135b791..a776e0be28 100644
70
74
--- a/src/archive/tar/reader.go
71
75
+++ b/src/archive/tar/reader.go
72
76
@@ -104,7 +104,7 @@ func (tr *Reader) next() (*Header, error) {
@@ -142,10 +146,6 @@ index f153b668de..c68a859ad8 100644
142
146
hdrs []*Header
143
147
chksums []string
144
148
rdbuf = make([]byte, 8)
145
- diff --git a/src/archive/tar/testdata/pax-bad-hdr-large.tar.bz2 b/src/archive/tar/testdata/pax-bad-hdr-large.tar.bz2
146
- new file mode 100644
147
- index 0000000000..06bf710d3a
148
- Binary files /dev/null and b/src/archive/tar/testdata/pax-bad-hdr-large.tar.bz2 differ
149
149
diff --git a/src/archive/tar/writer.go b/src/archive/tar/writer.go
150
150
index e80498d03e..893eac00ae 100644
151
151
--- a/src/archive/tar/writer.go
@@ -161,7 +161,7 @@ index e80498d03e..893eac00ae 100644
161
161
return err // Global headers return here
162
162
}
163
163
diff --git a/src/archive/tar/writer_test.go b/src/archive/tar/writer_test.go
164
- index 30556d27d0..4bd69fd548 100644
164
+ index 30556d27d0..cbf6a85525 100644
165
165
--- a/src/archive/tar/writer_test.go
166
166
+++ b/src/archive/tar/writer_test.go
167
167
@@ -1007,6 +1007,33 @@ func TestIssue12594(t *testing.T) {
0 commit comments