Skip to content

Commit 07f3e6d

Browse files
[Low] Patch moby-engine for CVE-2024-51744 (#13884)
1 parent 7fc5054 commit 07f3e6d

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 <[email protected]>
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: 24.0.9
6-
Release: 16%{?dist}
6+
Release: 17%{?dist}
77
License: ASL 2.0
88
Group: Tools/Container
99
URL: https://mobyproject.org
@@ -32,6 +32,7 @@ Patch12: CVE-2024-23650.patch
3232
Patch13: CVE-2025-22868.patch
3333
Patch14: CVE-2025-22869.patch
3434
Patch15: CVE-2025-30204.patch
35+
Patch16: CVE-2024-51744.patch
3536

3637
%{?systemd_requires}
3738

@@ -132,6 +133,9 @@ fi
132133
%{_unitdir}/*
133134

134135
%changelog
136+
* Thu May 22 2025 Akhila Guruju <[email protected]> - 24.0.9-17
137+
- Patch CVE-2024-51744
138+
135139
* Mon Apr 21 2025 Dallas Delaney <[email protected]> - 24.0.9-16
136140
- Patch CVE-2025-30204
137141

0 commit comments

Comments
 (0)