diff --git a/backport-CVE-2024-34459.patch b/backport-CVE-2024-34459.patch new file mode 100644 index 0000000000000000000000000000000000000000..3a3d6fe1a4274ea9d1a820b8f3b5f6febf26a5f7 --- /dev/null +++ b/backport-CVE-2024-34459.patch @@ -0,0 +1,26 @@ +From 2876ac5392a4e891b81e40e592c3ac6cb46016ce Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Tue, 14 May 2024 08:50:50 +0800 +Subject: [PATCH] [CVE-2024-34459] Fix buffer overread with `xmllint --htmlout` + +Add a missing bounds check. +--- + xmllint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xmllint.c b/xmllint.c +index 4093b4c..9d3b016 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -599,7 +599,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) { + len = strlen(buffer); + snprintf(&buffer[len], sizeof(buffer) - len, "\n"); + cur = input->cur; +- while ((*cur == '\n') || (*cur == '\r')) ++ while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) + cur--; + n = 0; + while ((cur != base) && (n++ < 80)) { +-- +2.33.0 + diff --git a/libxml2.spec b/libxml2.spec index d609f5ce2f5636b5e9baac6500e786244bed3ddf..1fe9094eb9efb3edb7fc3d6b6c2a55852cb51afb 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,7 +1,7 @@ Summary: Library providing XML and HTML support Name: libxml2 Version: 2.9.14 -Release: 10 +Release: 11 License: MIT Group: Development/Libraries Source: https://download.gnome.org/sources/%{name}/2.9/%{name}-%{version}.tar.xz @@ -190,6 +190,7 @@ Patch6168: backport-xpath-Ignore-entity-ref-nodes-when-computing-node-ha.patch Patch6169: backport-SAX-Always-initialize-SAX1-element-handlers.patch Patch6170: backport-CVE-2023-45322.patch Patch6171: backport-CVE-2024-25062.patch +Patch6172: backport-CVE-2024-34459.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: python3-devel @@ -345,6 +346,12 @@ rm -fr %{buildroot} %changelog +* Tue May 14 2024 cenhuilin - 2.9.14-11 +- Type:CVE +- CVE:CVE-2024-34459 +- SUG:NA +- DESC:fix CVE-2024-34459 + * Mon Feb 19 2024 hehuazhen - 2.9.14-10 - Type:CVE - SUG:NA