Skip to content

Commit 5244dca

Browse files
committed
Reapply "Patch vitess for CVE-2025-22868 [High] (#12729)"
This reverts commit ba754a3.
1 parent 9651a2a commit 5244dca

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

SPECS/vitess/CVE-2025-22868.patch

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 681b4d8edca1bcfea5bce685d77ea7b82ed3e7b3 Mon Sep 17 00:00:00 2001
2+
From: Neal Patel <[email protected]>
3+
Date: Thu, 30 Jan 2025 14:10:09 -0500
4+
Subject: [PATCH] jws: split token into fixed number of parts
5+
6+
Thanks to 'jub0bs' for reporting this issue.
7+
8+
Fixes #71490
9+
Fixes CVE-2025-22868
10+
11+
Change-Id: I2552731f46d4907f29aafe7863c558387b6bd6e2
12+
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/652155
13+
Auto-Submit: Gopher Robot <[email protected]>
14+
Reviewed-by: Damien Neil <[email protected]>
15+
Reviewed-by: Roland Shoemaker <[email protected]>
16+
LUCI-TryBot-Result: Go LUCI <[email protected]>
17+
---
18+
vendor/golang.org/x/oauth2/jws/jws.go | 4 ++--
19+
1 file changed, 2 insertions(+), 2 deletions(-)
20+
21+
diff --git a/vendor/golang.org/x/oauth2/jws/jws.go b/vendor/golang.org/x/oauth2/jws/jws.go
22+
index 95015648b..6f03a49d3 100644
23+
--- a/vendor/golang.org/x/oauth2/jws/jws.go
24+
+++ b/vendor/golang.org/x/oauth2/jws/jws.go
25+
@@ -165,11 +165,11 @@ func Encode(header *Header, c *ClaimSet, key *rsa.PrivateKey) (string, error) {
26+
// Verify tests whether the provided JWT token's signature was produced by the private key
27+
// associated with the supplied public key.
28+
func Verify(token string, key *rsa.PublicKey) error {
29+
- parts := strings.Split(token, ".")
30+
- if len(parts) != 3 {
31+
+ if strings.Count(token, ".") != 2 {
32+
return errors.New("jws: invalid token received, token must have 3 parts")
33+
}
34+
35+
+ parts := strings.SplitN(token, ".", 3)
36+
signedContent := parts[0] + "." + parts[1]
37+
signatureString, err := base64.RawURLEncoding.DecodeString(parts[2])
38+
if err != nil {

SPECS/vitess/vitess.spec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Name: vitess
55
Version: 19.0.4
6-
Release: 4%{?dist}
6+
Release: 5%{?dist}
77
Summary: Database clustering system for horizontal scaling of MySQL
88
# Upstream license specification: MIT and Apache-2.0
99
License: MIT and ASL 2.0
@@ -27,7 +27,8 @@ Source0: %{name}-%{version}.tar.gz
2727
#
2828
Source1: %{name}-%{version}-vendor.tar.gz
2929
Patch0: CVE-2017-14623.patch
30-
Patch1: CVE-2024-45339.patch
30+
Patch1: CVE-2024-45339.patch
31+
Patch2: CVE-2025-22868.patch
3132
BuildRequires: golang < 1.23
3233

3334
%description
@@ -105,6 +106,9 @@ go check -t go/cmd \
105106
%{_bindir}/*
106107

107108
%changelog
109+
* Mon Mar 03 2025 Kanishk Bansal <[email protected]> -19.0.4-5
110+
- Fix CVE-2025-22868 with an upstream patch
111+
108112
* Fri Jan 31 2025 Kavya Sree Kaitepalli <[email protected]> -19.0.4-4
109113
- Patch for CVE-2024-45339
110114

0 commit comments

Comments
 (0)