Skip to content

Commit e59443f

Browse files
[Low] Patch moby-engine for CVE-2024-51744 (#13885)
1 parent 06a004e commit e59443f

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
From c0a8f88b3e611b0a2533319636115226b6c3ee35 Mon Sep 17 00:00:00 2001
2+
From: akhila-guruju <v-guakhila@microsoft.com>
3+
Date: Thu, 22 May 2025 12:13:45 +0000
4+
Subject: [PATCH] Address CVE-2024-51744
5+
6+
Upstream Patch reference: https://github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c
7+
8+
---
9+
vendor/github.com/golang-jwt/jwt/v4/parser.go | 23 ++++++++-----------
10+
1 file changed, 10 insertions(+), 13 deletions(-)
11+
12+
diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser.go b/vendor/github.com/golang-jwt/jwt/v4/parser.go
13+
index 9484f28..d6e75db 100644
14+
--- a/vendor/github.com/golang-jwt/jwt/v4/parser.go
15+
+++ b/vendor/github.com/golang-jwt/jwt/v4/parser.go
16+
@@ -80,12 +80,17 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
17+
return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable}
18+
}
19+
20+
+ // Perform validation
21+
+ token.Signature = parts[2]
22+
+ if err := token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
23+
+ return token, &ValidationError{Inner: err, Errors: ValidationErrorSignatureInvalid}
24+
+ }
25+
+
26+
vErr := &ValidationError{}
27+
28+
// Validate Claims
29+
if !p.SkipClaimsValidation {
30+
if err := token.Claims.Valid(); err != nil {
31+
-
32+
// If the Claims Valid returned an error, check if it is a validation error,
33+
// If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set
34+
if e, ok := err.(*ValidationError); !ok {
35+
@@ -93,22 +98,14 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
36+
} else {
37+
vErr = e
38+
}
39+
+ return token, vErr
40+
}
41+
}
42+
43+
- // Perform validation
44+
- token.Signature = parts[2]
45+
- if err = token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
46+
- vErr.Inner = err
47+
- vErr.Errors |= ValidationErrorSignatureInvalid
48+
- }
49+
-
50+
- if vErr.valid() {
51+
- token.Valid = true
52+
- return token, nil
53+
- }
54+
+ // No errors so far, token is valid.
55+
+ token.Valid = true
56+
57+
- return token, vErr
58+
+ return token, nil
59+
}
60+
61+
// ParseUnverified parses the token but doesn't validate the signature.
62+
--
63+
2.45.2
64+

SPECS/moby-engine/moby-engine.spec

Lines changed: 5 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: 25.0.3
6-
Release: 12%{?dist}
6+
Release: 13%{?dist}
77
License: ASL 2.0
88
Group: Tools/Container
99
URL: https://mobyproject.org
@@ -27,6 +27,7 @@ Patch9: CVE-2023-45288.patch
2727
Patch10: CVE-2025-22868.patch
2828
Patch11: CVE-2025-22869.patch
2929
Patch12: CVE-2025-30204.patch
30+
Patch13: CVE-2024-51744.patch
3031

3132
%{?systemd_requires}
3233

@@ -122,6 +123,9 @@ fi
122123
%{_unitdir}/*
123124

124125
%changelog
126+
* Fri May 23 2025 Akhila Guruju <v-guakhila@microsoft.com> - 25.0.3-13
127+
- Patch CVE-2024-51744
128+
125129
* Mon Apr 21 2025 Dallas Delaney <dadelan@microsoft.com> - 25.0.3-12
126130
- Patch CVE-2025-30204
127131

0 commit comments

Comments
 (0)