Skip to content

Commit eb0be70

Browse files
[AUTO-CHERRYPICK] [Medium] Patch vitess for CVE-2025-22870 - branch main (#13132)
Co-authored-by: Sreenivasulu Malavathula (HCL Technologies Ltd) <v-smalavathu@microsoft.com>
1 parent 0e694aa commit eb0be70

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

SPECS/vitess/CVE-2025-22870.patch

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 78795fb465acee058a91bc6cfaee88563df39eb0 Mon Sep 17 00:00:00 2001
2+
From: Sreenivasulu Malavathula <v-smalavathu@microsoft.com>
3+
Date: Wed, 19 Mar 2025 17:57:00 -0500
4+
Subject: [PATCH] Address CVE-2025-22870
5+
6+
---
7+
vendor/golang.org/x/net/http/httpproxy/proxy.go | 10 ++++++++--
8+
1 file changed, 8 insertions(+), 2 deletions(-)
9+
10+
diff --git a/vendor/golang.org/x/net/http/httpproxy/proxy.go b/vendor/golang.org/x/net/http/httpproxy/proxy.go
11+
index 6404aaf..d89c257 100644
12+
--- a/vendor/golang.org/x/net/http/httpproxy/proxy.go
13+
+++ b/vendor/golang.org/x/net/http/httpproxy/proxy.go
14+
@@ -14,6 +14,7 @@ import (
15+
"errors"
16+
"fmt"
17+
"net"
18+
+ "net/netip"
19+
"net/url"
20+
"os"
21+
"strings"
22+
@@ -177,8 +178,10 @@ func (cfg *config) useProxy(addr string) bool {
23+
if host == "localhost" {
24+
return false
25+
}
26+
- ip := net.ParseIP(host)
27+
- if ip != nil {
28+
+ nip, err := netip.ParseAddr(host)
29+
+ var ip net.IP
30+
+ if err == nil {
31+
+ ip = net.IP(nip.AsSlice())
32+
if ip.IsLoopback() {
33+
return false
34+
}
35+
@@ -360,6 +363,9 @@ type domainMatch struct {
36+
}
37+
38+
func (m domainMatch) match(host, port string, ip net.IP) bool {
39+
+ if ip != nil {
40+
+ return false
41+
+ }
42+
if strings.HasSuffix(host, m.host) || (m.matchHost && host == m.host[1:]) {
43+
return m.port == "" || m.port == port
44+
}
45+
--
46+
2.45.2
47+

SPECS/vitess/vitess.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Name: vitess
55
Version: 17.0.7
6-
Release: 6%{?dist}
6+
Release: 7%{?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
@@ -30,6 +30,7 @@ Patch0: CVE-2024-45338.patch
3030
Patch1: CVE-2024-45339.patch
3131
Patch2: CVE-2025-22868.patch
3232
Patch3: CVE-2024-53257.patch
33+
Patch4: CVE-2025-22870.patch
3334
BuildRequires: golang
3435

3536
%description
@@ -102,6 +103,9 @@ go test -v ./go/cmd/... \
102103
%{_bindir}/*
103104

104105
%changelog
106+
* Thu Mar 20 2025 Sreeniavsulu Malavathula <v-smalavathu@microsoft.com> - 17.0.7-7
107+
- Fix CVE-2024-51744 with an upstream patch
108+
105109
* Thu Mar 06 2025 Kevin Lockwood <v-klockwood@microsoft.com> - 17.0.7-6
106110
- Fix add patch for CVE-2024-53257
107111

0 commit comments

Comments
 (0)