Skip to content

Commit 5fd49d6

Browse files
authored
Patch containerd and containerd2 for CVE-2025-27144 [medium] (#13068)
1 parent 909159a commit 5fd49d6

4 files changed

Lines changed: 109 additions & 2 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From fa324fa38481f9d2da9109cb5983326f62ff7507 Mon Sep 17 00:00:00 2001
2+
From: Kanishk-Bansal <kbkanishk975@gmail.com>
3+
Date: Fri, 28 Feb 2025 07:45:53 +0000
4+
Subject: [PATCH] CVE-2025-27144
5+
Upstream Ref: https://github.com/go-jose/go-jose/commit/c9ed84d8f0cfadcfad817150158caca6fcbc518b
6+
7+
---
8+
vendor/gopkg.in/square/go-jose.v2/jwe.go | 5 +++--
9+
vendor/gopkg.in/square/go-jose.v2/jws.go | 5 +++--
10+
2 files changed, 6 insertions(+), 4 deletions(-)
11+
12+
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwe.go b/vendor/gopkg.in/square/go-jose.v2/jwe.go
13+
index b5a6dcd..cd1de9e 100644
14+
--- a/vendor/gopkg.in/square/go-jose.v2/jwe.go
15+
+++ b/vendor/gopkg.in/square/go-jose.v2/jwe.go
16+
@@ -201,10 +201,11 @@ func (parsed *rawJSONWebEncryption) sanitized() (*JSONWebEncryption, error) {
17+
18+
// parseEncryptedCompact parses a message in compact format.
19+
func parseEncryptedCompact(input string) (*JSONWebEncryption, error) {
20+
- parts := strings.Split(input, ".")
21+
- if len(parts) != 5 {
22+
+ // Five parts is four separators
23+
+ if strings.Count(input, ".") != 4 {
24+
return nil, fmt.Errorf("square/go-jose: compact JWE format must have five parts")
25+
}
26+
+ parts := strings.SplitN(input, ".", 5)
27+
28+
rawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])
29+
if err != nil {
30+
diff --git a/vendor/gopkg.in/square/go-jose.v2/jws.go b/vendor/gopkg.in/square/go-jose.v2/jws.go
31+
index 7e261f9..a8d55fb 100644
32+
--- a/vendor/gopkg.in/square/go-jose.v2/jws.go
33+
+++ b/vendor/gopkg.in/square/go-jose.v2/jws.go
34+
@@ -275,10 +275,11 @@ func (parsed *rawJSONWebSignature) sanitized() (*JSONWebSignature, error) {
35+
36+
// parseSignedCompact parses a message in compact format.
37+
func parseSignedCompact(input string, payload []byte) (*JSONWebSignature, error) {
38+
- parts := strings.Split(input, ".")
39+
- if len(parts) != 3 {
40+
+ // Three parts is two separators
41+
+ if strings.Count(input, ".") != 2 {
42+
return nil, fmt.Errorf("square/go-jose: compact JWS format must have three parts")
43+
}
44+
+ parts := strings.SplitN(input, ".", 3)
45+
46+
if parts[1] != "" && payload != nil {
47+
return nil, fmt.Errorf("square/go-jose: payload is not detached")
48+
--
49+
2.45.2
50+

SPECS/containerd/containerd.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Summary: Industry-standard container runtime
55
Name: containerd
66
Version: 1.7.13
7-
Release: 6%{?dist}
7+
Release: 7%{?dist}
88
License: ASL 2.0
99
Group: Tools/Container
1010
URL: https://www.containerd.io
@@ -21,6 +21,7 @@ Patch3: CVE-2023-47108.patch
2121
Patch4: CVE-2024-24786.patch
2222
Patch5: CVE-2024-28180.patch
2323
Patch6: CVE-2023-45288.patch
24+
Patch7: CVE-2025-27144.patch
2425

2526
%{?systemd_requires}
2627

@@ -90,6 +91,9 @@ fi
9091
%dir /opt/containerd/lib
9192

9293
%changelog
94+
* Fri Mar 21 2025 Dallas Delaney <dadelan@microsoft.com> - 1.7.13-7
95+
- Fix CVE-2025-27144
96+
9397
* Fri Feb 14 2025 Kanishk Bansal <kanbansal@microsoft.com> - 1.7.13-6
9498
- Fix CVE-2024-28180, CVE-2023-45288
9599

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From fa324fa38481f9d2da9109cb5983326f62ff7507 Mon Sep 17 00:00:00 2001
2+
From: Kanishk-Bansal <kbkanishk975@gmail.com>
3+
Date: Fri, 28 Feb 2025 07:45:53 +0000
4+
Subject: [PATCH] CVE-2025-27144
5+
Upstream Ref: https://github.com/go-jose/go-jose/commit/c9ed84d8f0cfadcfad817150158caca6fcbc518b
6+
7+
---
8+
vendor/github.com/go-jose/go-jose/v4/jwe.go | 5 +++--
9+
vendor/github.com/go-jose/go-jose/v4/jws.go | 5 +++--
10+
2 files changed, 6 insertions(+), 4 deletions(-)
11+
12+
diff --git a/vendor/github.com/go-jose/go-jose/v4/jwe.go b/vendor/github.com/go-jose/go-jose/v4/jwe.go
13+
index 89f03ee..9f1322d 100644
14+
--- a/vendor/github.com/go-jose/go-jose/v4/jwe.go
15+
+++ b/vendor/github.com/go-jose/go-jose/v4/jwe.go
16+
@@ -288,10 +288,11 @@ func ParseEncryptedCompact(
17+
keyAlgorithms []KeyAlgorithm,
18+
contentEncryption []ContentEncryption,
19+
) (*JSONWebEncryption, error) {
20+
- parts := strings.Split(input, ".")
21+
- if len(parts) != 5 {
22+
+ // Five parts is four separators
23+
+ if strings.Count(input, ".") != 4 {
24+
return nil, fmt.Errorf("go-jose/go-jose: compact JWE format must have five parts")
25+
}
26+
+ parts := strings.SplitN(input, ".", 5)
27+
28+
rawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])
29+
if err != nil {
30+
diff --git a/vendor/github.com/go-jose/go-jose/v4/jws.go b/vendor/github.com/go-jose/go-jose/v4/jws.go
31+
index 3a91230..d09d8ba 100644
32+
--- a/vendor/github.com/go-jose/go-jose/v4/jws.go
33+
+++ b/vendor/github.com/go-jose/go-jose/v4/jws.go
34+
@@ -327,10 +327,11 @@ func parseSignedCompact(
35+
payload []byte,
36+
signatureAlgorithms []SignatureAlgorithm,
37+
) (*JSONWebSignature, error) {
38+
- parts := strings.Split(input, ".")
39+
- if len(parts) != 3 {
40+
+ // Three parts is two separators
41+
+ if strings.Count(input, ".") != 2 {
42+
return nil, fmt.Errorf("go-jose/go-jose: compact JWS format must have three parts")
43+
}
44+
+ parts := strings.SplitN(input, ".", 3)
45+
46+
if parts[1] != "" && payload != nil {
47+
return nil, fmt.Errorf("go-jose/go-jose: payload is not detached")
48+
--
49+
2.34.1

SPECS/containerd2/containerd2.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Summary: Industry-standard container runtime
66
Name: %{upstream_name}2
77
Version: 2.0.0
8-
Release: 5%{?dist}
8+
Release: 6%{?dist}
99
License: ASL 2.0
1010
Group: Tools/Container
1111
URL: https://www.containerd.io
@@ -18,6 +18,7 @@ Source2: containerd.toml
1818
# Added patch to support tardev-snapshotter for Kata CC
1919
Patch0: CVE-2024-45338.patch
2020
Patch1: add-tardev-support.patch
21+
Patch2: CVE-2025-27144.patch
2122
%{?systemd_requires}
2223

2324
BuildRequires: golang
@@ -89,6 +90,9 @@ fi
8990
%dir /opt/containerd/lib
9091

9192
%changelog
93+
* Fri Mar 21 2025 Dallas Delaney <dadelan@microsoft.com> - 2.0.0-6
94+
- Fix CVE-2025-27144
95+
9296
* Mon Mar 03 2025 Nan Liu <liunan@microsoft.com> - 2.0.0-5
9397
- Add "Provides/Obsoletes:" to shift all installs of containerd and moby-containerd to containerd2
9498

0 commit comments

Comments
 (0)