]> dgit.raspbian.org Git - qtbase-opensource-src.git/commit
QDomNode: fix unbounded nesting depth on destruction and clear()
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Mon, 21 Sep 2026 18:14:33 +0000 (21:14 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Mon, 21 Sep 2026 18:14:33 +0000 (21:14 +0300)
commitae6fe2afe2b76dcc8dfa00aac00451cdefac2293
tree0371ea318b4948e6296f013508b1631bf31596f1
parent678581c1cc55255c3884162fec88ff1ad61c5d5a
QDomNode: fix unbounded nesting depth on destruction and clear()

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=647b221ca885739a
Last-Update: 2026-09-21

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.

Gbp-Pq: Name CVE-2026-19248.diff
src/xml/dom/qdom.cpp