public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/mingw-qt6-qtbase] f43: Add patches
Date: Sat, 31 Oct 2026 14:13:52 GMT	[thread overview]
Message-ID: <179345603204.1.10925210601599522627.rpms-mingw-qt6-qtbase-3095107df124@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/mingw-qt6-qtbase
Branch : f43
Commit : 3095107df12444f471f069f67cdac5f4616b832c
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-10-31T15:13:35+01:00
Stats  : +268/-0 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/mingw-qt6-qtbase/c/3095107df12444f471f069f67cdac5f4616b832c?branch=f43

Log:
Add patches

---
diff --git a/CVE-2026-107157.patch b/CVE-2026-107157.patch
new file mode 100644
index 0000000..1a83072
--- /dev/null
+++ b/CVE-2026-107157.patch
@@ -0,0 +1,15 @@
+diff -rupN --no-dereference qtbase-everywhere-src-6.10.3/src/corelib/serialization/qcborvalue.h qtbase-everywhere-src-6.10.3-new/src/corelib/serialization/qcborvalue.h
+--- qtbase-everywhere-src-6.10.3/src/corelib/serialization/qcborvalue.h	2026-03-27 14:51:07.000000000 +0100
++++ qtbase-everywhere-src-6.10.3-new/src/corelib/serialization/qcborvalue.h	2026-10-31 15:06:27.484800885 +0100
+@@ -243,9 +243,9 @@ public:
+     static QCborValue fromCbor(QCborStreamReader &reader);
+     static QCborValue fromCbor(const QByteArray &ba, QCborParserError *error = nullptr);
+     static QCborValue fromCbor(const char *data, qsizetype len, QCborParserError *error = nullptr)
+-    { return fromCbor(QByteArray(data, int(len)), error); }
++    { return fromCbor(QByteArray(data, len), error); }
+     static QCborValue fromCbor(const quint8 *data, qsizetype len, QCborParserError *error = nullptr)
+-    { return fromCbor(QByteArray(reinterpret_cast<const char *>(data), int(len)), error); }
++    { return fromCbor(QByteArray(reinterpret_cast<const char *>(data), len), error); }
+ #endif // QT_CONFIG(cborstreamreader)
+ #if QT_CONFIG(cborstreamwriter)
+     QByteArray toCbor(EncodingOptions opt = NoTransformation) const;

diff --git a/CVE-2026-19248.patch b/CVE-2026-19248.patch
new file mode 100644
index 0000000..7506615
--- /dev/null
+++ b/CVE-2026-19248.patch
@@ -0,0 +1,129 @@
+diff -rupN --no-dereference qtbase-everywhere-src-6.10.3/src/xml/dom/qdom.cpp qtbase-everywhere-src-6.10.3-new/src/xml/dom/qdom.cpp
+--- qtbase-everywhere-src-6.10.3/src/xml/dom/qdom.cpp	2026-03-27 14:51:07.000000000 +0100
++++ qtbase-everywhere-src-6.10.3-new/src/xml/dom/qdom.cpp	2026-10-31 15:06:28.542587979 +0100
+@@ -1086,16 +1086,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 -rupN --no-dereference qtbase-everywhere-src-6.10.3/tests/auto/xml/dom/qdom/tst_qdom.cpp qtbase-everywhere-src-6.10.3-new/tests/auto/xml/dom/qdom/tst_qdom.cpp
+--- qtbase-everywhere-src-6.10.3/tests/auto/xml/dom/qdom/tst_qdom.cpp	2026-03-27 14:51:07.000000000 +0100
++++ qtbase-everywhere-src-6.10.3-new/tests/auto/xml/dom/qdom/tst_qdom.cpp	2026-10-31 15:06:28.543215237 +0100
+@@ -10,6 +10,7 @@
+ #include <QtCore/qbytearray.h>
+ #include <QtCore/qcoreapplication.h>
+ #include <QtCore/qdebug.h>
++#include <QtCore/qelapsedtimer.h>
+ #include <QtCore/qfile.h>
+ #include <QtCore/qlist.h>
+ #include <QtCore/qregularexpression.h>
+@@ -126,6 +127,8 @@ private slots:
+     void testDomListComparison_data();
+     void testDomListComparison();
+     void noCrashOnDeepNesting() const;
++    void noCrashOnDeepNestingDtor() const { noCrashOnDeepNesting_impl(DeepNestingOp::Dtor); }
++    void noCrashOnDeepNestingClear() const { noCrashOnDeepNesting_impl(DeepNestingOp::Clear); }
+ 
+     void cleanupTestCase() const;
+ 
+@@ -138,6 +141,12 @@ private:
+     static QString onNullWarning(const char *const functionName);
+     static bool isDeepEqual(const QDomNode &n1, const QDomNode &n2);
+     static bool isFakeXMLDeclaration(const QDomNode &node);
++    enum class DeepNestingOp {
++        Dtor,
++        Clear,
++    };
++    static constexpr size_t DeepNestingDepth = 250'000;
++    static void noCrashOnDeepNesting_impl(DeepNestingOp op);
+ 
+     QList<QByteArray> m_testCodecs;
+ };
+@@ -2716,6 +2725,25 @@ void tst_QDom::testDomListComparison()
+     QT_TEST_EQUALITY_OPS(lhs, rhs, result);
+ }
+ 
++static QDomDocument makeNested(size_t depth)
++{
++    QDomDocument doc;
++    if (!depth)
++        return doc;
++
++    // Need to build it bottom-up (QTBUG-147190)...
++
++    QDomElement a = doc.createElement("a");
++    for (size_t i = 1; i < depth; ++i) {
++        QDomElement parent = doc.createElement("a");
++        parent.appendChild(std::exchange(a, parent));
++    }
++
++    doc.appendChild(a); // only now associate it with the doc (QTBUG-147190)
++
++    return doc;
++}
++
+ // The fix of QTBUG-131151 crash
+ void tst_QDom::noCrashOnDeepNesting() const
+ {
+@@ -2732,5 +2760,35 @@ void tst_QDom::noCrashOnDeepNesting() co
+     file.close();
+ }
+ 
++// QTBUG-146936: dtor
++void tst_QDom::noCrashOnDeepNesting_impl(DeepNestingOp op)
++{
++    const auto print = [](const QElapsedTimer &timer, const char *operation) {
++        std::chrono::duration<double> secs = timer.durationElapsed();
++        qDebug("%s %llu-deep document in %fs", operation,
++               qulonglong(DeepNestingDepth), secs.count());
++    };
++
++    QElapsedTimer timer;
++    timer.start();
++    std::optional doc = makeNested(DeepNestingDepth);
++    print(timer, "created");
++
++    timer.restart();
++    const char *operation;
++    // the actual test is that it doesn't run off the stack and crashes (QTBUG-146936):
++    switch (op) {
++    case DeepNestingOp::Dtor:
++        operation = "destroyed";
++        doc.reset();
++        break;
++    case DeepNestingOp::Clear:
++        operation = "cleared";
++        doc->clear();
++        break;
++    }
++    print(timer, operation);
++}
++
+ QTEST_MAIN(tst_QDom)
+ #include "tst_qdom.moc"

diff --git a/CVE-2026-76151.patch b/CVE-2026-76151.patch
new file mode 100644
index 0000000..774a6db
--- /dev/null
+++ b/CVE-2026-76151.patch
@@ -0,0 +1,124 @@
+diff -rupN --no-dereference qtbase-everywhere-src-6.10.3/src/network/access/qnetworkcookie.cpp qtbase-everywhere-src-6.10.3-new/src/network/access/qnetworkcookie.cpp
+--- qtbase-everywhere-src-6.10.3/src/network/access/qnetworkcookie.cpp	2026-03-27 14:51:07.000000000 +0100
++++ qtbase-everywhere-src-6.10.3-new/src/network/access/qnetworkcookie.cpp	2026-10-31 15:06:29.592915290 +0100
+@@ -377,20 +377,20 @@ void QNetworkCookie::setValue(const QByt
+ }
+ 
+ // ### move this to qnetworkcookie_p.h and share with qnetworkaccesshttpbackend
+-static std::pair<QByteArray, QByteArray> nextField(QByteArrayView text, int &position, bool isNameValue)
++static std::pair<QByteArray, QByteArray> nextField(QByteArrayView text, qsizetype &position, bool isNameValue)
+ {
+     // format is one of:
+     //    (1)  token
+     //    (2)  token = token
+     //    (3)  token = quoted-string
+-    const int length = text.size();
++    const qsizetype length = text.size();
+     position = nextNonWhitespace(text, position);
+ 
+-    int semiColonPosition = text.indexOf(';', position);
++    qsizetype semiColonPosition = text.indexOf(';', position);
+     if (semiColonPosition < 0)
+         semiColonPosition = length; //no ';' means take everything to end of string
+ 
+-    int equalsPosition = text.indexOf('=', position);
++    qsizetype equalsPosition = text.indexOf('=', position);
+     if (equalsPosition < 0 || equalsPosition > semiColonPosition) {
+         if (isNameValue)
+             return std::pair(QByteArray(), QByteArray()); //'=' is required for name-value-pair (RFC6265 section 5.2, rule 2)
+@@ -399,7 +399,7 @@ static std::pair<QByteArray, QByteArray>
+ 
+     QByteArray first = text.mid(position, equalsPosition - position).trimmed().toByteArray();
+     QByteArray second;
+-    int secondLength = semiColonPosition - equalsPosition - 1;
++    qsizetype secondLength = semiColonPosition - equalsPosition - 1;
+     if (secondLength > 0)
+         second = text.mid(equalsPosition + 1, secondLength).trimmed().toByteArray();
+ 
+@@ -959,8 +959,8 @@ QList<QNetworkCookie> QNetworkCookiePriv
+     QList<QNetworkCookie> result;
+     const QDateTime now = QDateTime::currentDateTimeUtc();
+ 
+-    int position = 0;
+-    const int length = cookieString.size();
++    qsizetype position = 0;
++    const qsizetype length = cookieString.size();
+     while (position < length) {
+         QNetworkCookie cookie;
+ 
+@@ -981,7 +981,7 @@ QList<QNetworkCookie> QNetworkCookiePriv
+ 
+                 if (field.first.compare("expires", Qt::CaseInsensitive) == 0) {
+                     position -= field.second.size();
+-                    int end;
++                    qsizetype end;
+                     for (end = position; end < length; ++end)
+                         if (isValueSeparator(cookieString.at(end)))
+                             break;
+diff -rupN --no-dereference qtbase-everywhere-src-6.10.3/src/network/access/qnetworkcookie_p.h qtbase-everywhere-src-6.10.3-new/src/network/access/qnetworkcookie_p.h
+--- qtbase-everywhere-src-6.10.3/src/network/access/qnetworkcookie_p.h	2026-03-27 14:51:07.000000000 +0100
++++ qtbase-everywhere-src-6.10.3-new/src/network/access/qnetworkcookie_p.h	2026-10-31 15:06:29.593119714 +0100
+@@ -44,7 +44,8 @@ static inline bool isLWS(char c)
+     return c == ' ' || c == '\t' || c == '\r' || c == '\n';
+ }
+ 
+-static int nextNonWhitespace(QByteArrayView text, int from)
++// Used in qnetworkcookie.cpp and qnetworkreplyhttpimpl.cpp
++static qsizetype nextNonWhitespace(QByteArrayView text, qsizetype from)
+ {
+     // RFC 2616 defines linear whitespace as:
+     //  LWS = [CRLF] 1*( SP | HT )
+diff -rupN --no-dereference qtbase-everywhere-src-6.10.3/src/network/access/qnetworkreplyhttpimpl.cpp qtbase-everywhere-src-6.10.3-new/src/network/access/qnetworkreplyhttpimpl.cpp
+--- qtbase-everywhere-src-6.10.3/src/network/access/qnetworkreplyhttpimpl.cpp	2026-03-27 14:51:07.000000000 +0100
++++ qtbase-everywhere-src-6.10.3-new/src/network/access/qnetworkreplyhttpimpl.cpp	2026-10-31 15:06:29.593341557 +0100
+@@ -52,7 +52,7 @@ static QHash<QByteArray, QByteArray> par
+     // value-directive = token "=" (token | quoted-string)
+     QHash<QByteArray, QByteArray> result;
+ 
+-    int pos = 0;
++    qsizetype pos = 0;
+     while (true) {
+         // skip spaces
+         pos = nextNonWhitespace(header, pos);
+@@ -60,15 +60,15 @@ static QHash<QByteArray, QByteArray> par
+             return result;      // end of parsing
+ 
+         // pos points to a non-whitespace
+-        int comma = header.indexOf(',', pos);
+-        int equal = header.indexOf('=', pos);
++        const qsizetype comma = header.indexOf(',', pos);
++        const qsizetype equal = header.indexOf('=', pos);
+         if (comma == pos || equal == pos)
+             // huh? Broken header.
+             return result;
+ 
+         // The key name is delimited by either a comma, an equal sign or the end
+         // of the header, whichever comes first
+-        int end = comma;
++        qsizetype end = comma;
+         if (end == -1)
+             end = header.size();
+         if (equal != -1 && end > equal)
+@@ -76,7 +76,7 @@ static QHash<QByteArray, QByteArray> par
+         const auto key = header.sliced(pos, end - pos).trimmed();
+         pos = end + 1;
+ 
+-        if (uint(equal) < uint(comma)) {
++        if (size_t(equal) < size_t(comma)) {
+             // case: token "=" (token | quoted-string)
+             // skip spaces
+             pos = nextNonWhitespace(header, pos);
+@@ -127,10 +127,10 @@ static QHash<QByteArray, QByteArray> par
+             result.insert(key.toByteArray().toLower(), value);
+ 
+             // find the comma now:
+-            comma = header.indexOf(',', pos);
+-            if (comma == -1)
++            if (qsizetype comma = header.indexOf(',', pos); comma == -1)
+                 return result;  // end of parsing
+-            pos = comma + 1;
++            else
++                pos = comma + 1;
+         } else {
+             // case: token
+             // key is already set

                 reply	other threads:[~2026-10-31 14:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179345603204.1.10925210601599522627.rpms-mingw-qt6-qtbase-3095107df124@fedoraproject.org \
    --to=manisandro@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox