Skip to content

Commit ebc7703

Browse files
Patch CVE-2024-26147 for cert-manager (#9268)
1 parent 47df674 commit ebc7703

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From d02be38fc6c54828d5eec15efe058c61f3df4a60 Mon Sep 17 00:00:00 2001
2+
From: Mykhailo Bykhovtsev <mbykhovtsev@microsoft.com>
3+
Date: Thu, 30 May 2024 16:33:17 -0700
4+
Subject: [PATCH] backport patch CVE-2024-26147. Based off commit https://github.com/helm/helm/commit/bb4cc9125503a923afb7988f3eb478722a8580af
5+
6+
---
7+
vendor/helm.sh/helm/v3/pkg/plugin/plugin.go | 4 ++++
8+
vendor/helm.sh/helm/v3/pkg/repo/index.go | 4 ++++
9+
2 files changed, 8 insertions(+)
10+
11+
diff --git a/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go b/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go
12+
index 1399b71..df580db 100644
13+
--- a/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go
14+
+++ b/vendor/helm.sh/helm/v3/pkg/plugin/plugin.go
15+
@@ -173,6 +173,10 @@ var validPluginName = regexp.MustCompile("^[A-Za-z0-9_-]+$")
16+
17+
// validatePluginData validates a plugin's YAML data.
18+
func validatePluginData(plug *Plugin, filepath string) error {
19+
+ // When metadata section missing, initialize with no data
20+
+ if plug.Metadata == nil {
21+
+ plug.Metadata = &Metadata{}
22+
+ }
23+
if !validPluginName.MatchString(plug.Metadata.Name) {
24+
return fmt.Errorf("invalid plugin name at %q", filepath)
25+
}
26+
diff --git a/vendor/helm.sh/helm/v3/pkg/repo/index.go b/vendor/helm.sh/helm/v3/pkg/repo/index.go
27+
index 60cfe58..94852bb 100644
28+
--- a/vendor/helm.sh/helm/v3/pkg/repo/index.go
29+
+++ b/vendor/helm.sh/helm/v3/pkg/repo/index.go
30+
@@ -347,6 +347,10 @@ func loadIndex(data []byte, source string) (*IndexFile, error) {
31+
log.Printf("skipping loading invalid entry for chart %q from %s: empty entry", name, source)
32+
continue
33+
}
34+
+ // When metadata section missing, initialize with no data
35+
+ if cvs[idx].Metadata == nil {
36+
+ cvs[idx].Metadata = &chart.Metadata{}
37+
+ }
38+
if cvs[idx].APIVersion == "" {
39+
cvs[idx].APIVersion = chart.APIVersionV1
40+
}
41+
--
42+
2.34.1
43+

SPECS/cert-manager/cert-manager.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Automatically provision and manage TLS certificates in Kubernetes
22
Name: cert-manager
33
Version: 1.11.2
4-
Release: 9%{?dist}
4+
Release: 10%{?dist}
55
License: ASL 2.0
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -21,6 +21,7 @@ Source0: https://github.com/jetstack/%{name}/archive/refs/tags/v%{version
2121
Source1: %{name}-%{version}-govendor.tar.gz
2222
Patch0: CVE-2023-48795.patch
2323
Patch1: CVE-2023-45288.patch
24+
Patch2: CVE-2024-26147.patch
2425
BuildRequires: golang
2526
Requires: %{name}-acmesolver
2627
Requires: %{name}-cainjector
@@ -113,6 +114,9 @@ install -D -m0755 bin/webhook %{buildroot}%{_bindir}/
113114
%{_bindir}/webhook
114115

115116
%changelog
117+
* Thu May 30 2024 Mykhailo Bykhovtsev <mbykhovtsev@microsoft.com> - 1.11.2-10
118+
- Patch for CVE-2024-26147
119+
116120
* Thu Apr 18 2024 Chris Gunn <chrisgun@microsoft.com> - 1.11.2-9
117121
- Fix for CVE-2023-45288
118122

0 commit comments

Comments
 (0)