Skip to content

Commit c9270e7

Browse files
[AUTO-CHERRYPICK] Patch ig for CVE-2025-27144 [Medium] - branch 3.0-dev (#13037)
Co-authored-by: Kanishk Bansal <103916909+Kanishk-Bansal@users.noreply.github.com>
1 parent c180a6f commit c9270e7

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

SPECS/ig/CVE-2025-27144.patch

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

SPECS/ig/ig.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
Summary: The eBPF tool and systems inspection framework for Kubernetes, containers and Linux hosts.
22
Name: ig
33
Version: 0.37.0
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: Apache 2.0 and GPL 2.0 for eBPF code
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
88
Group: Tools/Container
99
URL: https://github.com/inspektor-gadget/inspektor-gadget
1010
Source0: https://github.com/inspektor-gadget/inspektor-gadget/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
1111
Source1: %{name}-%{version}-govendor-v1.tar.gz
12+
Patch0: CVE-2025-27144.patch
1213
BuildRequires: golang >= 1.23
1314

1415

@@ -65,6 +66,9 @@ fi
6566
%{_bindir}/ig
6667

6768
%changelog
69+
* Fri Mar 14 2025 Kanishk Bansal <kanbansal@microsoft.com> - 0.37.0-2
70+
- Add patch for CVE-2025-27144
71+
6872
* Mon Feb 03 2025 Francis Laniel <flaniel@linux.microsoft.com> - 0.37.0-1
6973
- Bump to version 0.37.0
7074
- Drop patch for CVE-2024-45338 as it was fixed in golang.org/x/net 0.33.0 and ig uses 0.34.0.

0 commit comments

Comments
 (0)