Skip to content

Commit 756caef

Browse files
Patch keras for CVE-2025-12638
1 parent a7cf917 commit 756caef

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

SPECS/keras/CVE-2025-12638.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From d275df9ef4a873f8d979fb4d27753e1369a155f2 Mon Sep 17 00:00:00 2001
2+
From: AllSpark <[email protected]>
3+
Date: Mon, 8 Dec 2025 06:05:01 +0000
4+
Subject: [PATCH] Use filter="data" option of TarFile.extractall and add path
5+
filtering for zip archives; share extraction code between file_utils and
6+
saving_lib
7+
8+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
9+
Upstream-reference: AI Backport of https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e95.patch
10+
---
11+
keras/src/saving/saving_lib.py | 1 +
12+
1 file changed, 1 insertion(+)
13+
14+
diff --git a/keras/src/saving/saving_lib.py b/keras/src/saving/saving_lib.py
15+
index 1668489..f4d6fa0 100644
16+
--- a/keras/src/saving/saving_lib.py
17+
+++ b/keras/src/saving/saving_lib.py
18+
@@ -556,6 +556,7 @@ class DiskIOStore:
19+
if self.archive:
20+
self.tmp_dir = get_temp_dir()
21+
if self.mode == "r":
22+
+ # Extract archive using path filtering to prevent unsafe paths
23+
file_utils.extract_open_archive(self.archive, self.tmp_dir)
24+
self.working_dir = file_utils.join(
25+
self.tmp_dir, self.root_path
26+
--
27+
2.45.4
28+

SPECS/keras/keras.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Summary: Keras is a high-level neural networks API.
44
Name: keras
55
Version: 3.3.3
6-
Release: 5%{?dist}
6+
Release: 6%{?dist}
77
License: ASL 2.0
88
Vendor: Microsoft Corporation
99
Distribution: Azure Linux
@@ -16,6 +16,7 @@ Patch01: CVE-2025-1550.patch
1616
Patch02: CVE-2025-8747.patch
1717
Patch03: CVE-2025-9905.patch
1818
Patch4: CVE-2025-12060.patch
19+
Patch5: CVE-2025-12638.patch
1920

2021
# Fix for CVE-2025-9906 included as part of CVE-2025-8747 and kept here as nopatch
2122
# and commented out, because from patch command perspective, these files
@@ -80,6 +81,9 @@ python3 pip_build.py --install
8081

8182

8283
%changelog
84+
* Mon Dec 08 2025 Azure Linux Security Servicing Account <[email protected]> - 3.3.3-6
85+
- Patch for CVE-2025-12638
86+
8387
* Fri Oct 31 2025 Azure Linux Security Servicing Account <[email protected]> - 3.3.3-5
8488
- Patch for CVE-2025-12060
8589

0 commit comments

Comments
 (0)