Skip to content

Commit 14eade5

Browse files
[AUTO-CHERRYPICK] Fix CVE-2024-24786 for influxdb - branch main (#11656)
Co-authored-by: KavyaSree2610 <92566732+KavyaSree2610@users.noreply.github.com>
1 parent 1ffa8c2 commit 14eade5

2 files changed

Lines changed: 46 additions & 1 deletion

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From 867d49d8c566b0f1284f8295ba1286d6c5e93edf Mon Sep 17 00:00:00 2001
2+
From: kavyasree <kkaitepalli@microsoft.com>
3+
Date: Mon, 9 Dec 2024 17:03:26 +0530
4+
Subject: [PATCH] Modified patch
5+
6+
---
7+
.../protobuf/encoding/protojson/well_known_types.go | 4 ++++
8+
.../protobuf/internal/encoding/json/decode.go | 2 +-
9+
2 files changed, 5 insertions(+), 1 deletion(-)
10+
11+
diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
12+
index c85f846..634ba41 100644
13+
--- a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
14+
+++ b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
15+
@@ -348,6 +348,10 @@ func (d decoder) skipJSONValue() error {
16+
}
17+
}
18+
}
19+
+ case json.EOF:
20+
+ // This can only happen if there's a bug in Decoder.Read.
21+
+ // Avoid an infinite loop if this does happen.
22+
+ return errors.New("unexpected EOF")
23+
}
24+
return nil
25+
}
26+
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
27+
index b13fd29..b2be4e8 100644
28+
--- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
29+
+++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
30+
@@ -121,7 +121,7 @@ func (d *Decoder) Read() (Token, error) {
31+
32+
case ObjectClose:
33+
if len(d.openStack) == 0 ||
34+
- d.lastToken.kind == comma ||
35+
+ d.lastToken.kind&(Name|comma) != 0 ||
36+
d.openStack[len(d.openStack)-1] != ObjectOpen {
37+
return Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())
38+
}
39+
--
40+
2.34.1
41+

SPECS/influxdb/influxdb.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Summary: Scalable datastore for metrics, events, and real-time analytics
1919
Name: influxdb
2020
Version: 2.6.1
21-
Release: 17%{?dist}
21+
Release: 18%{?dist}
2222
License: MIT
2323
Vendor: Microsoft Corporation
2424
Distribution: Mariner
@@ -57,6 +57,7 @@ Source5: config.yaml
5757
Source6: influxdb-user.conf
5858
Patch0: CVE-2024-6104.patch
5959
Patch1: CVE-2022-32149.patch
60+
Patch2: CVE-2024-24786.patch
6061
BuildRequires: clang
6162
BuildRequires: golang <= 1.18.8
6263
BuildRequires: kernel-headers
@@ -146,6 +147,9 @@ go test ./...
146147
%{_tmpfilesdir}/influxdb.conf
147148

148149
%changelog
150+
* Mon Dec 09 2024 Kavya Sree Kaitepalli <kkaitepalli@microsoft.com> - 2.6.1-18
151+
- Patch for CVE-2024-24786
152+
149153
* Tue Sep 17 2024 Sumedh Sharma <sumsharma@microsoft.com> - 2.6.1-17
150154
- Add patch to resolve CVE-2022-32149
151155

0 commit comments

Comments
 (0)