Skip to content

Commit 2cf83ec

Browse files
[Cherry-Pick] Fix CVE-2022-32149 in application-gateway-kubernetes-ingress (#10274) (#10376)
Co-authored-by: sindhu-karri <33163197+sindhu-karri@users.noreply.github.com>
1 parent 7fa8c05 commit 2cf83ec

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 7ee36713a66401f828dfe476196ca290f7c23ffe Mon Sep 17 00:00:00 2001
2+
From: Sindhu Karri <lakarri@microsoft.com>
3+
Date: Wed, 28 Aug 2024 05:01:17 +0000
4+
Subject: [PATCH] Fix CVE-2022-32149
5+
6+
---
7+
vendor/golang.org/x/text/language/parse.go | 5 +++++
8+
1 file changed, 5 insertions(+)
9+
10+
diff --git a/vendor/golang.org/x/text/language/parse.go b/vendor/golang.org/x/text/language/parse.go
11+
index 11acfd8..11d11f4 100644
12+
--- a/vendor/golang.org/x/text/language/parse.go
13+
+++ b/vendor/golang.org/x/text/language/parse.go
14+
@@ -133,6 +133,7 @@ func update(b *language.Builder, part ...interface{}) (err error) {
15+
}
16+
17+
var errInvalidWeight = errors.New("ParseAcceptLanguage: invalid weight")
18+
+var errTagListTooLarge = errors.New("tag list exceeds max length")
19+
20+
// ParseAcceptLanguage parses the contents of an Accept-Language header as
21+
// defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and
22+
@@ -150,6 +151,10 @@ func ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) {
23+
24+
entry, weight := split(entry, ';')
25+
26+
+ if strings.Count(s, "-") > 1000 {
27+
+ return nil, nil, errTagListTooLarge
28+
+ }
29+
+
30+
// Scan the language.
31+
t, err := Parse(entry)
32+
if err != nil {
33+
--
34+
2.33.8
35+

SPECS/application-gateway-kubernetes-ingress/application-gateway-kubernetes-ingress.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Summary: Application Gateway Ingress Controller
33
Name: application-gateway-kubernetes-ingress
44
Version: 1.4.0
5-
Release: 21%{?dist}
5+
Release: 22%{?dist}
66
License: MIT
77
Vendor: Microsoft Corporation
88
Distribution: Mariner
@@ -29,6 +29,7 @@ Source1: %{name}-%{version}-vendor.tar.gz
2929
Patch0: CVE-2022-21698.patch
3030
Patch1: CVE-2023-44487.patch
3131
Patch2: CVE-2021-44716.patch
32+
Patch3: CVE-2022-32149.patch
3233

3334
BuildRequires: golang
3435
%if %{with_check}
@@ -67,6 +68,9 @@ cp appgw-ingress %{buildroot}%{_bindir}/
6768
%{_bindir}/appgw-ingress
6869

6970
%changelog
71+
* Wed Aug 28 2024 Sindhu Karri <lakarri@microsoft.com> - 1.4.0-22
72+
- Fix CVE-2022-32149 with a patch
73+
7074
* Wed Jul 17 2024 Muhammad Falak R Wani <mwani@microsoft.com> - 1.4.0-21
7175
- Drop requirement on a specific version of golang
7276

0 commit comments

Comments
 (0)