Skip to content

Commit cc04b88

Browse files
Patch skopeo for CVE-2025-58183
1 parent 7c23d09 commit cc04b88

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

SPECS/skopeo/CVE-2025-58183.patch

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
From ae107b2e9910340a8f5faafb5f4316609991b507 Mon Sep 17 00:00:00 2001
2+
From: AllSpark <[email protected]>
3+
Date: Mon, 17 Nov 2025 08:57:04 +0000
4+
Subject: [PATCH] archive/tar: set a limit on the size of GNU sparse file 1.0
5+
regions
6+
7+
Cap the size of the sparse block data to the same limit used for PAX headers (1 MiB).
8+
9+
This is a port of upstream commit 2612dcfd3cb6dd73c76e14a24fe1a68e2708e4e3.
10+
11+
Fixes CVE-2025-58183
12+
13+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
14+
Upstream-reference: AI Backport from existing Build 984415 of https://github.com/vbatts/tar-split/commit/55da7d6b43bd806ee785d783bdf66bcf302af118.patch
15+
---
16+
vendor/github.com/vbatts/tar-split/archive/tar/common.go | 1 +
17+
vendor/github.com/vbatts/tar-split/archive/tar/reader.go | 9 +++++++--
18+
2 files changed, 8 insertions(+), 2 deletions(-)
19+
20+
diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/common.go b/vendor/github.com/vbatts/tar-split/archive/tar/common.go
21+
index dee9e47..e687a08 100644
22+
--- a/vendor/github.com/vbatts/tar-split/archive/tar/common.go
23+
+++ b/vendor/github.com/vbatts/tar-split/archive/tar/common.go
24+
@@ -34,6 +34,7 @@ var (
25+
errMissData = errors.New("archive/tar: sparse file references non-existent data")
26+
errUnrefData = errors.New("archive/tar: sparse file contains unreferenced data")
27+
errWriteHole = errors.New("archive/tar: write non-NUL byte in sparse hole")
28+
+ errSparseTooLong = errors.New("archive/tar: sparse map too long")
29+
)
30+
31+
type headerError []string
32+
diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/reader.go b/vendor/github.com/vbatts/tar-split/archive/tar/reader.go
33+
index 40f6c86..7a56fa1 100644
34+
--- a/vendor/github.com/vbatts/tar-split/archive/tar/reader.go
35+
+++ b/vendor/github.com/vbatts/tar-split/archive/tar/reader.go
36+
@@ -576,12 +576,17 @@ func readGNUSparseMap1x0(r io.Reader) (sparseDatas, error) {
37+
cntNewline int64
38+
buf bytes.Buffer
39+
blk block
40+
+ totalSize int
41+
)
42+
43+
// feedTokens copies data in blocks from r into buf until there are
44+
// at least cnt newlines in buf. It will not read more blocks than needed.
45+
feedTokens := func(n int64) error {
46+
for cntNewline < n {
47+
+ totalSize += len(blk)
48+
+ if totalSize > maxSpecialFileSize {
49+
+ return errSparseTooLong
50+
+ }
51+
if _, err := mustReadFull(r, blk[:]); err != nil {
52+
return err
53+
}
54+
@@ -614,8 +619,8 @@ func readGNUSparseMap1x0(r io.Reader) (sparseDatas, error) {
55+
}
56+
57+
// Parse for all member entries.
58+
- // numEntries is trusted after this since a potential attacker must have
59+
- // committed resources proportional to what this library used.
60+
+ // numEntries is trusted after this since feedTokens limits the number of
61+
+ // tokens based on maxSpecialFileSize.
62+
if err := feedTokens(2 * numEntries); err != nil {
63+
return nil, err
64+
}
65+
--
66+
2.45.4
67+

SPECS/skopeo/skopeo.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Inspect container images and repositories on registries
22
Name: skopeo
33
Version: 1.14.4
4-
Release: 6%{?dist}
4+
Release: 7%{?dist}
55
License: Apache-2.0
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
@@ -14,6 +14,7 @@ Patch2: CVE-2023-45288.patch
1414
Patch3: CVE-2024-9676.patch
1515
Patch4: CVE-2025-27144.patch
1616
Patch5: CVE-2025-58058.patch
17+
Patch6: CVE-2025-58183.patch
1718

1819
%global debug_package %{nil}
1920
%define our_gopath %{_topdir}/.gopath
@@ -52,6 +53,9 @@ make test-unit-local
5253
%{_mandir}/man1/%%{name}*
5354

5455
%changelog
56+
* Mon Nov 17 2025 Azure Linux Security Servicing Account <[email protected]> - 1.14.4-7
57+
- Patch for CVE-2025-58183
58+
5559
* Wed Sep 03 2025 Azure Linux Security Servicing Account <[email protected]> - 1.14.4-6
5660
- Patch for CVE-2025-58058
5761

0 commit comments

Comments
 (0)