diff --git a/Bugfix-for-CVE-2025-32415.patch b/Bugfix-for-CVE-2025-32415.patch new file mode 100644 index 0000000000000000000000000000000000000000..fd9f6de7cfc57dda8cd69d0198648bb0f828bc77 --- /dev/null +++ b/Bugfix-for-CVE-2025-32415.patch @@ -0,0 +1,37 @@ +From 384cc7c182fc00c6d5e2ab4b5e3671b2e3f93c84 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Sun, 6 Apr 2025 12:41:11 +0200 +Subject: [PATCH] [CVE-2025-32415] schemas: Fix heap buffer overflow in + xmlSchemaIDCFillNodeTables + +Don't use local variable which could contain a stale value. + +Fixes #890. +--- + xmlschemas.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xmlschemas.c b/xmlschemas.c +index e35c117ef..4bdabd129 100644 +--- a/xmlschemas.c ++++ b/xmlschemas.c +@@ -23324,7 +23324,7 @@ xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, + j++; + } while (j < nbDupls); + } +- if (nbNodeTable) { ++ if (bind->nbNodes) { + j = 0; + do { + if (nbFields == 1) { +@@ -23375,7 +23375,7 @@ xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, + + next_node_table_entry: + j++; +- } while (j < nbNodeTable); ++ } while (j < bind->nbNodes); + } + /* + * If everything is fine, then add the IDC target-node to +-- +GitLab diff --git a/libxml2.spec b/libxml2.spec index 297090078f36077bd83bb153ce3b056b8d0547ca..0a2ccf060674870ef12e6d745cfe96223ad39859 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,4 +1,4 @@ -%define anolis_release 6 +%define anolis_release 7 Name: libxml2 Version: 2.11.5 Release: %{anolis_release}%{?dist} @@ -30,6 +30,9 @@ Patch5: 1001-fix-CVE-2024-40896.patch # Upstream fix: https://gitlab.gnome.org/GNOME/libxml2/-/commit/8d415b8911be26b12b85497f7cc57143b5321787 Patch6: bugfix-for-cve-2025-32414.patch +# CVE-2025-32415 +# Upstream fix: https://gitlab.gnome.org/GNOME/libxml2/-/commit/384cc7c182fc00c6d5e2ab4b5e3671b2e3f93c84 +Patch7: Bugfix-for-CVE-2025-32415.patch BuildRequires: cmake-rpm-macros BuildRequires: gcc BuildRequires: make @@ -174,6 +177,9 @@ gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz %doc NEWS README.md %changelog +* Sat May 10 2025 yangjinlin01 - 2.11.5-7 +- Fix CVE-2025-32415 + * Mon Apr 14 2025 qizengtian - 2.11.5-6 - Fix CVE-2025-32414