Skip to content

Commit feb12c0

Browse files
authored
[Medium] Patch influxdb for CVE-2025-22872 (#13600)
Signed-off-by: Sreenivasulu Malavathula <v-smalavathu@microsoft.com>
1 parent 5a74a32 commit feb12c0

2 files changed

Lines changed: 47 additions & 1 deletion

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From a3f5350a002664d23967a79ef563d23ef16b85ee Mon Sep 17 00:00:00 2001
2+
From: Sreenivasulu Malavathula <v-smalavathu@microsoft.com>
3+
Date: Fri, 25 Apr 2025 18:18:46 -0500
4+
Subject: [PATCH] Address CVE-2025-22872
5+
Upstream Patch Reference: https://github.com/golang/net/commit/e1fcd82abba34df74614020343be8eb1fe85f0d9
6+
7+
---
8+
vendor/golang.org/x/net/html/token.go | 18 ++++++++++++++++--
9+
1 file changed, 16 insertions(+), 2 deletions(-)
10+
11+
diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go
12+
index de67f93..9bbdf7d 100644
13+
--- a/vendor/golang.org/x/net/html/token.go
14+
+++ b/vendor/golang.org/x/net/html/token.go
15+
@@ -839,8 +839,22 @@ func (z *Tokenizer) readStartTag() TokenType {
16+
if raw {
17+
z.rawTag = strings.ToLower(string(z.buf[z.data.start:z.data.end]))
18+
}
19+
- // Look for a self-closing token like "<br/>".
20+
- if z.err == nil && z.buf[z.raw.end-2] == '/' {
21+
+ // Look for a self-closing token (e.g. <br/>).
22+
+ //
23+
+ // Originally, we did this by just checking that the last character of the
24+
+ // tag (ignoring the closing bracket) was a solidus (/) character, but this
25+
+ // is not always accurate.
26+
+ //
27+
+ // We need to be careful that we don't misinterpret a non-self-closing tag
28+
+ // as self-closing, as can happen if the tag contains unquoted attribute
29+
+ // values (i.e. <p a=/>).
30+
+ //
31+
+ // To avoid this, we check that the last non-bracket character of the tag
32+
+ // (z.raw.end-2) isn't the same character as the last non-quote character of
33+
+ // the last attribute of the tag (z.pendingAttr[1].end-1), if the tag has
34+
+ // attributes.
35+
+ nAttrs := len(z.attr)
36+
+ if z.err == nil && z.buf[z.raw.end-2] == '/' && (nAttrs == 0 || z.raw.end-2 != z.attr[nAttrs-1][1].end-1) {
37+
return SelfClosingTagToken
38+
}
39+
return StartTagToken
40+
--
41+
2.45.2
42+

SPECS/influxdb/influxdb.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Summary: Scalable datastore for metrics, events, and real-time analytics
1919
Name: influxdb
2020
Version: 2.7.5
21-
Release: 4%{?dist}
21+
Release: 5%{?dist}
2222
License: MIT
2323
Vendor: Microsoft Corporation
2424
Distribution: Azure Linux
@@ -66,6 +66,7 @@ Patch7: CVE-2025-27144.patch
6666
Patch8: CVE-2025-22868.patch
6767
Patch9: CVE-2025-22870.patch
6868
Patch10: CVE-2024-51744.patch
69+
Patch11: CVE-2025-22872.patch
6970
BuildRequires: clang
7071
BuildRequires: golang
7172
BuildRequires: kernel-headers
@@ -155,6 +156,9 @@ go test ./...
155156
%{_tmpfilesdir}/influxdb.conf
156157

157158
%changelog
159+
* Fri Apr 25 2025 Sreeniavsulu Malavathula <v-smalavathu@microsoft.com> - 2.7.5-5
160+
- Patch CVE-2025-22872
161+
158162
* Mon Apr 21 2025 Kavya Sree Kaitepalli <kkaitepalli@microsoft.com> - 2.7.5-4
159163
- Pin rust version
160164

0 commit comments

Comments
 (0)