public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt5-qtbase] f43: Fix CVE-2026-19248, denial of Service vulnerability in XML parsing
@ 2026-10-13 10:25 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-10-13 10:25 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/qt5-qtbase
Branch : f43
Commit : 2f0d7f7897fce3db674dffd21c9cc8d5332dd735
Author : Than Ngo <than@redhat.com>
Date   : 2026-10-13T12:25:05+02:00
Stats  : +55/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/qt5-qtbase/c/2f0d7f7897fce3db674dffd21c9cc8d5332dd735?branch=f43

Log:
Fix CVE-2026-19248, denial of Service vulnerability in XML parsing

---
diff --git a/qt5-qtbase-CVE-2026-19248.patch b/qt5-qtbase-CVE-2026-19248.patch
new file mode 100644
index 0000000..9070a51
--- /dev/null
+++ b/qt5-qtbase-CVE-2026-19248.patch
@@ -0,0 +1,48 @@
+https://code.qt.io/cgit/qt/qtbase.git/commit/?id=647b221ca885739a69ece5695b7dcddcf3227558
+
+Subject: QDomNode: fix unbounded nesting depth on destruction and clear()
+
+In both ~QDomNodePrivate() and QDomNodePrivate::clear(), the code
+simply walked the list of chldren (->first, ->next), and deleted each
+one in turn. This recurses into ~QDomNodePrivate() and uses stack
+space proportional to the height of the tree. Since the latter is
+user-controlled, this is a an easy DoS, so fix the implementation to
+use iteration instead of recursion.
+
+Note that it suffices to fix ~QDomNodePrivate(), as clear() only
+recurses via the dtor, too.
+
+diff -up qtbase-everywhere-src-5.15.18/src/xml/dom/qdom.cpp.me qtbase-everywhere-src-5.15.18/src/xml/dom/qdom.cpp
+--- qtbase-everywhere-src-5.15.18/src/xml/dom/qdom.cpp.me	2026-09-24 10:46:29.713670981 +0200
++++ qtbase-everywhere-src-5.15.18/src/xml/dom/qdom.cpp	2026-09-24 10:47:31.099616334 +0200
+@@ -992,16 +992,21 @@ QDomNodePrivate::QDomNodePrivate(QDomNod
+ 
+ QDomNodePrivate::~QDomNodePrivate()
+ {
+-    QDomNodePrivate* p = first;
+-    QDomNodePrivate* n;
++    QDomNodePrivate *p = this;
+ 
+-    while (p) {
+-        n = p->next;
+-        if (!p->ref.deref())
+-            delete p;
+-        else
+-            p->setNoParent();
+-        p = n;
++    // post-order depth-first-search; visitation is deletion (avoids recursion)
++    while (true) {
++        if (QDomNodePrivate *c = p->first) {
++           p->first = c->next;          // peel firstChild off p
++            if (c->ref.deref())
++                c->setNoParent();        // survivor: detach, don't descend
++            else
++                p = c;                   // descend; c's parent() remembers p
++        } else {                         // p ran out of children (= is a leaf now)
++            if (p == this)
++                break;                   // we're done, don't `delete this`
++            delete std::exchange(p, p->parent());  // deletes and ascends
++        }
+     }
+     first = nullptr;
+     last = nullptr;

diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec
index 718662e..ed3886b 100644
--- a/qt5-qtbase.spec
+++ b/qt5-qtbase.spec
@@ -57,7 +57,7 @@
 Name:    qt5-qtbase
 Summary: Qt5 - QtBase components
 Version: 5.15.18
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 # See LGPL_EXCEPTIONS.txt, for exception details
 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
@@ -190,6 +190,8 @@ Patch168: 0019-Fix-tooltip-palette-issue-in-gtk3-theme.patch
 Patch169: 0020-QGtk3Theme-define-light-midlight-mid-dark-shadow-colors.patch
 
 # Security
+# CVE-2026-19248, Unbounded recursion vulnerability in the QDomNode destructor of Qt XML impacts Qt
+Patch180: qt5-qtbase-CVE-2026-19248.patch
 
 # Latest QGnomePlatform needs to be specified to be used
 Patch200: qtbase-use-qgnomeplatform-as-default-platform-theme-on-gnome.patch
@@ -507,7 +509,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
 %patch -P168 -p1
 %patch -P169 -p1
 %endif
-
+%patch -P180 -p1
 %if 0%{?fedora} < 39
 # Use QGnomePlatform by default
 %patch -P200 -p1
@@ -1177,6 +1179,9 @@ fi
 
 
 %changelog
+* Tue Oct 13 2026 Than Ngo <than@redhat.com> - 5.15.18-2
+- Fix CVE-2026-19248, denial of Service vulnerability in XML parsing
+
 * Tue Nov 04 2025 Jan Grulich <jgrulich@redhat.com> - 5.15.18-1
 - 5.15.18
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-13 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 10:25 [rpms/qt5-qtbase] f43: Fix CVE-2026-19248, denial of Service vulnerability in XML parsing Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox