Skip to content

Commit 8ee3863

Browse files
nicogbgsuresh-thelkarjslobodzian
authored
[AUTO-CHERRYPICK] Patch CVE-2024-24786 in moby-engine - branch main (#11607)
Co-authored-by: suresh-thelkar <suresh.thelkar@yahoo.com> Co-authored-by: jslobodzian <joslobo@microsoft.com>
1 parent 177a178 commit 8ee3863

2 files changed

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

SPECS/moby-engine/moby-engine.spec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Summary: The open-source application container engine
44
Name: moby-engine
55
Version: 24.0.9
6-
Release: 11%{?dist}
6+
Release: 13%{?dist}
77
License: ASL 2.0
88
Group: Tools/Container
99
URL: https://mobyproject.org
@@ -26,6 +26,8 @@ Patch6: CVE-2024-41110.patch
2626
Patch7: CVE-2024-29018.patch
2727
Patch8: CVE-2024-36621.patch
2828
Patch9: CVE-2024-36623.patch
29+
Patch10: CVE-2024-45337.patch
30+
Patch11: CVE-2024-24786.patch
2931

3032
%{?systemd_requires}
3133

@@ -126,6 +128,12 @@ fi
126128
%{_unitdir}/*
127129

128130
%changelog
131+
* Thu Dec 19 2024 Suresh Thelkar <sthelkar@microsoft.com> - 24.0.9-13
132+
- Patch CVE-2024-24786
133+
134+
* Tue Dec 17 2024 Andrew Phelps <anphel@microsoft.com> - 24.0.9-12
135+
- Add patch for CVE-2024-45337
136+
129137
* Wed Dec 04 2024 Adit Jha <aditjha@microsoft.com> - 24.0.9-11
130138
- Patch CVE-2024-36621 & CVE-2024-36623
131139

0 commit comments

Comments
 (0)