Version in base suite: 2.12.7+dfsg+really2.9.14-2.1+deb13u3 Base version: libxml2_2.12.7+dfsg+really2.9.14-2.1+deb13u3 Target version: libxml2_2.12.7+dfsg+really2.9.14-2.1+deb13u4 Base file: /srv/ftp-master.debian.org/ftp/pool/main/libx/libxml2/libxml2_2.12.7+dfsg+really2.9.14-2.1+deb13u3.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/libx/libxml2/libxml2_2.12.7+dfsg+really2.9.14-2.1+deb13u4.dsc changelog | 13 +++++++++ patches/CVE-2026-74860.patch | 14 ++++++++++ patches/CVE-2026-76781.patch | 15 ++++++++++ patches/CVE-2026-86138.patch | 52 +++++++++++++++++++++++++++++++++++++ patches/CVE-2026-86140.patch | 36 +++++++++++++++++++++++++ patches/CVE-2026-86142.patch | 29 ++++++++++++++++++++ patches/CVE-2026-86143.patch | 60 +++++++++++++++++++++++++++++++++++++++++++ patches/CVE-2026-86144.patch | 39 +++++++++++++++++++++++++++ patches/series | 7 +++++ 9 files changed, 265 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpydsn1ntx/libxml2_2.12.7+dfsg+really2.9.14-2.1+deb13u3.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpydsn1ntx/libxml2_2.12.7+dfsg+really2.9.14-2.1+deb13u4.dsc: no acceptable signature found diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/changelog libxml2-2.12.7+dfsg+really2.9.14/debian/changelog --- libxml2-2.12.7+dfsg+really2.9.14/debian/changelog 2026-06-07 17:02:23.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/changelog 2026-07-08 11:47:23.000000000 +0000 @@ -1,3 +1,16 @@ +libxml2 (2.12.7+dfsg+really2.9.14-2.1+deb13u4) trixie; urgency=high + + * CVE-2026-76781: guard duplicate nextCatalog lookup against a missing + catalog entry. + * CVE-2026-74860: keep the Python reference transferred to the list. + * CVE-2026-86138: bound QName lengths and dictionary pool growth. + * CVE-2026-86140: check space for element-list delimiters. + * CVE-2026-86142: check XPointer part length before allocation. + * CVE-2026-86143: check output buffer lengths before write callbacks. + * CVE-2026-86144: propagate parser options to XInclude processing. + + -- Aron Xu Wed, 08 Jul 2026 19:47:23 +0800 + libxml2 (2.12.7+dfsg+really2.9.14-2.1+deb13u3) trixie; urgency=high * Non-maintainer upload. diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-74860.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-74860.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-74860.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-74860.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,14 @@ +Description: Keep the reference transferred to the Python attribute list +Origin: backport, https://gitlab.gnome.org/GNOME/libxml2/-/commit/f41e1865781f74d1cadfe2fbdfeefed946026f12 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-74860 + +--- a/python/libxml.c ++++ b/python/libxml.c +@@ -1334,7 +1334,6 @@ + for (node = tree; node != NULL; node = node->next) { + newName = PY_IMPORT_STRING((char *) node->name); + PyList_SetItem(nameList, count, newName); +- Py_DECREF(newName); + count++; + } + result = PyObject_CallMethod(handler, (char *) "attributeDecl", diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-76781.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-76781.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-76781.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-76781.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,15 @@ +Description: Guard duplicate nextCatalog lookup against a missing entry +Origin: backport, https://gitlab.gnome.org/GNOME/libxml2/-/commit/a34c084d7a576914c1424caabdaaf5e227bb39ef +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-76781 + +--- a/catalog.c ++++ b/catalog.c +@@ -1296,7 +1296,7 @@ + BAD_CAST "nextCatalog", NULL, + BAD_CAST "catalog", prefer, cgroup); + /* Avoid duplication of nextCatalog */ +- while (prev != NULL) { ++ while ((entry != NULL) && (prev != NULL)) { + if ((prev->type == XML_CATA_NEXT_CATALOG) && + (xmlStrEqual (prev->URL, entry->URL)) && + (prev->prefer == entry->prefer) && diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86138.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86138.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86138.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86138.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,52 @@ +Description: Bound QName component lengths and dictionary pool growth + Backport only the QName hunks from the string-length change. +Origin: backport, https://gitlab.gnome.org/GNOME/libxml2/-/commit/a4cba4b5b5a8c42e155ed42d2d2a44955465a2e4 +Bug: https://gitlab.gnome.org/GNOME/libxml2/-/commit/f45abbd3e561d25743053236a401cea49e6bdb24 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-86138 + +--- a/dict.c ++++ b/dict.c +@@ -332,10 +332,21 @@ + return(NULL); + } + +- if (size == 0) size = 1000; +- else size *= 4; /* exponential growth */ +- if (size < 4 * (namelen + plen + 1)) +- size = 4 * (namelen + plen + 1); /* just in case ! */ ++ if (size == 0) { ++ size = 1000; ++ } else { ++ if (size < (SIZE_MAX - sizeof(xmlDictStrings)) / 4) ++ size *= 4; /* exponential growth */ ++ else ++ size = SIZE_MAX - sizeof(xmlDictStrings); ++ } ++ if (size / 4 < namelen + plen + 1) { ++ if ((size_t) namelen + plen + 1 < ++ (SIZE_MAX - sizeof(xmlDictStrings)) / 4) ++ size = 4 * ((size_t) namelen + plen + 1); /* just in case ! */ ++ else ++ return(NULL); ++ } + pool = (xmlDictStringsPtr) xmlMalloc(sizeof(xmlDictStrings) + size); + if (pool == NULL) + return(NULL); +@@ -1116,7 +1127,7 @@ + xmlDictEntryPtr entry; + xmlDictEntryPtr insert; + const xmlChar *ret; +- unsigned int len, plen, l; ++ size_t len, plen, l; + + if ((dict == NULL) || (name == NULL)) + return(NULL); +@@ -1125,6 +1136,8 @@ + + l = len = strlen((const char *) name); + plen = strlen((const char *) prefix); ++ if ((len > INT_MAX / 2) || (plen > INT_MAX / 2)) ++ return(NULL); + len += 1 + plen; + + /* diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86140.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86140.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86140.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86140.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,36 @@ +Description: Bound delimiter writes in xmlSnprintfElements +Origin: backport, https://gitlab.gnome.org/GNOME/libxml2/-/commit/d1686f91dbda141a752200419d35639fd6b38340 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-86140 + +--- a/valid.c ++++ b/valid.c +@@ -5249,7 +5249,15 @@ + int len; + + if (node == NULL) return; +- if (glob) strcat(buf, "("); ++ len = strlen(buf); ++ if (glob) { ++ if (size - len < 50) { ++ if ((size - len > 4) && (buf[len - 1] != '.')) ++ strcat(buf, " ..."); ++ return; ++ } ++ strcat(buf, "("); ++ } + cur = node; + while (cur != NULL) { + len = strlen(buf); +@@ -5316,7 +5324,11 @@ + } + cur = cur->next; + } +- if (glob) strcat(buf, ")"); ++ if (glob) { ++ len = strlen(buf); ++ if (size - len > 1) ++ strcat(buf, ")"); ++ } + } + + /** diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86142.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86142.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86142.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86142.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Check XPointer part length before allocating a buffer + Keep empty input distinct from xmlStrlen overflow and add terminator space in size_t. +Origin: backport, https://gitlab.gnome.org/GNOME/libxml2/-/commit/6b3a736c0edc74ceec3d82f5252499d7911b3a58 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-86142 + +--- a/xpointer.c ++++ b/xpointer.c +@@ -946,7 +946,7 @@ + static void + xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) { + xmlChar *buffer, *cur; +- int len; ++ size_t len; + int level; + + if (name == NULL) +@@ -962,6 +962,12 @@ + level = 1; + + len = xmlStrlen(ctxt->cur); ++ /* xmlStrlen returns zero for both an empty string and overflow. */ ++ if ((len == 0) && (*ctxt->cur != 0)) { ++ xmlXPtrErrMemory("allocating buffer"); ++ xmlFree(name); ++ return; ++ } + len++; + buffer = (xmlChar *) xmlMallocAtomic(len * sizeof (xmlChar)); + if (buffer == NULL) { diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86143.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86143.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86143.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86143.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,60 @@ +Description: Check output buffer lengths before invoking write callbacks + Adaptation from Ubuntu Noble 2.9.14+dfsg-1.3ubuntu3.10, including WriteEscape. +Origin: vendor, https://git.launchpad.net/ubuntu/+source/libxml2/plain/debian/patches/CVE-2026-86143.patch?h=applied/2.9.14%2Bdfsg-1.3ubuntu3.10 +Applied-Upstream: https://gitlab.gnome.org/GNOME/libxml2/-/commit/90f293ba74d28b1d570920382e707586f68ebf35 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-86143 + +--- a/xmlIO.c ++++ b/xmlIO.c +@@ -3420,6 +3420,11 @@ + len -= chunk; + + if (out->writecallback) { ++ if (xmlBufUse((out->encoder != NULL) ? out->conv : out->buffer) >= ++ INT_MAX) { ++ out->error = XML_ERR_INTERNAL_ERROR; ++ return(-1); ++ } + if ((nbchars < MINLEN) && (len <= 0)) + goto done; + +@@ -3619,6 +3624,11 @@ + len -= cons; + + if (out->writecallback) { ++ if (xmlBufUse((out->encoder != NULL) ? out->conv : out->buffer) >= ++ INT_MAX) { ++ out->error = XML_ERR_INTERNAL_ERROR; ++ return(-1); ++ } + if ((nbchars < MINLEN) && (len <= 0)) + goto done; + +@@ -3721,15 +3731,25 @@ + */ + if ((out->conv != NULL) && (out->encoder != NULL) && + (out->writecallback != NULL)) { ++ size_t bufsize = xmlBufUse(out->conv); ++ if (bufsize >= INT_MAX) { ++ out->error = XML_ERR_INTERNAL_ERROR; ++ return(-1); ++ } + ret = out->writecallback(out->context, + (const char *)xmlBufContent(out->conv), +- xmlBufUse(out->conv)); ++ bufsize); + if (ret >= 0) + xmlBufShrink(out->conv, ret); + } else if (out->writecallback != NULL) { ++ size_t bufsize = xmlBufUse(out->buffer); ++ if (bufsize >= INT_MAX) { ++ out->error = XML_ERR_INTERNAL_ERROR; ++ return(-1); ++ } + ret = out->writecallback(out->context, + (const char *)xmlBufContent(out->buffer), +- xmlBufUse(out->buffer)); ++ bufsize); + if (ret >= 0) + xmlBufShrink(out->buffer, ret); + } diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86144.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86144.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86144.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/CVE-2026-86144.patch 2026-07-08 11:47:23.000000000 +0000 @@ -0,0 +1,39 @@ +Description: Propagate parser flags through XInclude wrappers and text loading + Adaptation from Ubuntu Noble 2.9.14+dfsg-1.3ubuntu3.10. +Origin: vendor, https://git.launchpad.net/ubuntu/+source/libxml2/plain/debian/patches/CVE-2026-86144.patch?h=applied/2.9.14%2Bdfsg-1.3ubuntu3.10 +Applied-Upstream: https://gitlab.gnome.org/GNOME/libxml2/-/commit/b63cd517afecb76582dd9488c55e54ceaf50de61 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-86144 + +--- a/xinclude.c ++++ b/xinclude.c +@@ -1883,6 +1883,12 @@ + * Load it. + */ + pctxt = xmlNewParserCtxt(); ++ if (pctxt == NULL) { ++ xmlXIncludeErrMemory(ctxt, NULL, "cannot allocate parser context"); ++ xmlFree(URL); ++ return(-1); ++ } ++ xmlCtxtUseOptions(pctxt, ctxt->parseFlags); + inputStream = xmlLoadExternalEntity((const char*)URL, NULL, pctxt); + if(inputStream == NULL) { + xmlFreeParserCtxt(pctxt); +@@ -2579,7 +2585,7 @@ + */ + int + xmlXIncludeProcess(xmlDocPtr doc) { +- return(xmlXIncludeProcessFlags(doc, 0)); ++ return(xmlXIncludeProcessFlags(doc, doc ? doc->parseFlags : 0)); + } + + /** +@@ -2624,7 +2630,7 @@ + */ + int + xmlXIncludeProcessTree(xmlNodePtr tree) { +- return(xmlXIncludeProcessTreeFlags(tree, 0)); ++ return(xmlXIncludeProcessTreeFlags(tree, (tree && tree->doc) ? tree->doc->parseFlags : 0)); + } + + /** diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series 2026-06-07 17:02:23.000000000 +0000 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series 2026-07-08 11:47:23.000000000 +0000 @@ -38,3 +38,10 @@ 0038-fix-memory-leak-in-issue-1054.patch 0039-schematron-fix-additional-memory-leaks-on-error-path.patch 0040-catalog-fix-stack-overflow-from-self-referencing-SGM.patch +CVE-2026-76781.patch +CVE-2026-74860.patch +CVE-2026-86138.patch +CVE-2026-86140.patch +CVE-2026-86142.patch +CVE-2026-86143.patch +CVE-2026-86144.patch