Skip to content

[Low] Patch moby-engine for CVE-2024-51744 #13885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions SPECS/moby-engine/CVE-2024-51744.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
From c0a8f88b3e611b0a2533319636115226b6c3ee35 Mon Sep 17 00:00:00 2001
From: akhila-guruju <[email protected]>
Date: Thu, 22 May 2025 12:13:45 +0000
Subject: [PATCH] Address CVE-2024-51744

Upstream Patch reference: https://github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c

---
vendor/github.com/golang-jwt/jwt/v4/parser.go | 23 ++++++++-----------
1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser.go b/vendor/github.com/golang-jwt/jwt/v4/parser.go
index 9484f28..d6e75db 100644
--- a/vendor/github.com/golang-jwt/jwt/v4/parser.go
+++ b/vendor/github.com/golang-jwt/jwt/v4/parser.go
@@ -80,12 +80,17 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable}
}

+ // Perform validation
+ token.Signature = parts[2]
+ if err := token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
+ return token, &ValidationError{Inner: err, Errors: ValidationErrorSignatureInvalid}
+ }
+
vErr := &ValidationError{}

// Validate Claims
if !p.SkipClaimsValidation {
if err := token.Claims.Valid(); err != nil {
-
// If the Claims Valid returned an error, check if it is a validation error,
// If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set
if e, ok := err.(*ValidationError); !ok {
@@ -93,22 +98,14 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
} else {
vErr = e
}
+ return token, vErr
}
}

- // Perform validation
- token.Signature = parts[2]
- if err = token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
- vErr.Inner = err
- vErr.Errors |= ValidationErrorSignatureInvalid
- }
-
- if vErr.valid() {
- token.Valid = true
- return token, nil
- }
+ // No errors so far, token is valid.
+ token.Valid = true

- return token, vErr
+ return token, nil
}

// ParseUnverified parses the token but doesn't validate the signature.
--
2.45.2

6 changes: 5 additions & 1 deletion SPECS/moby-engine/moby-engine.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Summary: The open-source application container engine
Name: moby-engine
Version: 25.0.3
Release: 12%{?dist}
Release: 13%{?dist}
License: ASL 2.0
Group: Tools/Container
URL: https://mobyproject.org
Expand All @@ -27,6 +27,7 @@ Patch9: CVE-2023-45288.patch
Patch10: CVE-2025-22868.patch
Patch11: CVE-2025-22869.patch
Patch12: CVE-2025-30204.patch
Patch13: CVE-2024-51744.patch

%{?systemd_requires}

Expand Down Expand Up @@ -122,6 +123,9 @@ fi
%{_unitdir}/*

%changelog
* Fri May 23 2025 Akhila Guruju <[email protected]> - 25.0.3-13
- Patch CVE-2024-51744

* Mon Apr 21 2025 Dallas Delaney <[email protected]> - 25.0.3-12
- Patch CVE-2025-30204

Expand Down
Loading