Skip to content

Commit 62051b9

Browse files
[AutoPR- Security] Patch nvidia-container-toolkit for CVE-2025-22872 [MEDIUM] (microsoft#14404)
1 parent 0d1ad3f commit 62051b9

File tree

2 files changed

+48
-1
lines changed

2 files changed

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

SPECS/nvidia-container-toolkit/nvidia-container-toolkit.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Summary: NVIDIA container runtime hook
33
Name: nvidia-container-toolkit
44
Version: 1.17.8
5-
Release: 1%{?dist}
5+
Release: 2%{?dist}
66
License: ALS2.0
77
Vendor: Microsoft Corporation
88
Distribution: Azure Linux
@@ -28,6 +28,7 @@ Source0: %{name}-%{version}.tar.gz
2828
# See: https://reproducible-builds.org/docs/archives/
2929
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
3030
Source1: %{name}-%{version}-vendor.tar.gz
31+
Patch0: CVE-2025-22872.patch
3132
BuildRequires: golang < 1.24.0
3233
Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook <= 1.4.0-2
3334
Provides: nvidia-container-runtime
@@ -87,6 +88,9 @@ rm -f %{_bindir}/nvidia-container-toolkit
8788
%{_bindir}/nvidia-cdi-hook
8889

8990
%changelog
91+
* Mon Jul 28 2025 Azure Linux Security Servicing Account <[email protected]> - 1.17.8-2
92+
- Patch for CVE-2025-22872
93+
9094
* Thu Jul 24 2025 Sam Meluch <[email protected]> - 1.17.8-1
9195
- Upgrade to 1.17.8 to resolve CVE-2025-23266
9296

0 commit comments

Comments
 (0)