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-qt5-qtdeclarative] f45: Backport fix for CVE-2025-12385
Date: Sat, 31 Oct 2026 15:32:27 GMT	[thread overview]
Message-ID: <179346074735.1.9283920493559258231.rpms-mingw-qt5-qtdeclarative-ed81b35ff0dc@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/mingw-qt5-qtdeclarative
Branch : f45
Commit : ed81b35ff0dc0f4d870d9e4e8775376fedf319f4
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-10-31T16:23:13+01:00
Stats  : +60/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mingw-qt5-qtdeclarative/c/ed81b35ff0dc0f4d870d9e4e8775376fedf319f4?branch=f45

Log:
Backport fix for CVE-2025-12385

---
diff --git a/CVE-2025-12385.patch b/CVE-2025-12385.patch
new file mode 100644
index 0000000..ee3f522
--- /dev/null
+++ b/CVE-2025-12385.patch
@@ -0,0 +1,53 @@
+diff -rupN --no-dereference qtdeclarative-everywhere-src-5.15.18/src/quick/items/qquicktextdocument.cpp qtdeclarative-everywhere-src-5.15.18-new/src/quick/items/qquicktextdocument.cpp
+--- qtdeclarative-everywhere-src-5.15.18/src/quick/items/qquicktextdocument.cpp	2025-06-05 23:08:43.000000000 +0200
++++ qtdeclarative-everywhere-src-5.15.18-new/src/quick/items/qquicktextdocument.cpp	2026-10-31 16:22:12.888525340 +0100
+@@ -137,10 +137,9 @@ QSizeF QQuickTextDocumentWithImageResour
+ {
+     if (format.isImageFormat()) {
+         QTextImageFormat imageFormat = format.toImageFormat();
+-
+-        const int width = qRound(imageFormat.width());
++        const int width = qRound(qBound(qreal(INT_MIN), imageFormat.width(), qreal(INT_MAX)));
+         const bool hasWidth = imageFormat.hasProperty(QTextFormat::ImageWidth) && width > 0;
+-        const int height = qRound(imageFormat.height());
++        const int height = qRound(qBound(qreal(INT_MIN), imageFormat.height(), qreal(INT_MAX)));
+         const bool hasHeight = imageFormat.hasProperty(QTextFormat::ImageHeight) && height > 0;
+ 
+         QSizeF size(width, height);
+diff -rupN --no-dereference qtdeclarative-everywhere-src-5.15.18/src/quick/util/qquickstyledtext.cpp qtdeclarative-everywhere-src-5.15.18-new/src/quick/util/qquickstyledtext.cpp
+--- qtdeclarative-everywhere-src-5.15.18/src/quick/util/qquickstyledtext.cpp	2025-06-05 23:08:43.000000000 +0200
++++ qtdeclarative-everywhere-src-5.15.18-new/src/quick/util/qquickstyledtext.cpp	2026-10-31 16:22:12.889217588 +0100
+@@ -45,6 +45,11 @@
+ #include <qmath.h>
+ #include "qquickstyledtext_p.h"
+ #include <QQmlContext>
++#include <QtGui/private/qoutlinemapper_p.h>
++
++#ifndef QQUICKSTYLEDPARSER_COORD_LIMIT
++#  define QQUICKSTYLEDPARSER_COORD_LIMIT QT_RASTER_COORD_LIMIT
++#endif
+ 
+ Q_LOGGING_CATEGORY(lcStyledText, "qt.quick.styledtext")
+ 
+@@ -694,9 +699,19 @@ void QQuickStyledTextPrivate::parseImage
+             if (attr.first == QLatin1String("src")) {
+                 image->url =  QUrl(attr.second.toString());
+             } else if (attr.first == QLatin1String("width")) {
+-                image->size.setWidth(attr.second.toString().toInt());
++                bool ok;
++                int v = attr.second.toString().toInt(&ok);
++                if (ok && v <= QQUICKSTYLEDPARSER_COORD_LIMIT)
++                    image->size.setWidth(v);
++                else
++                    qCWarning(lcStyledText) << "Invalid width provided for <img>";
+             } else if (attr.first == QLatin1String("height")) {
+-                image->size.setHeight(attr.second.toString().toInt());
++                bool ok;
++                int v = attr.second.toString().toInt(&ok);
++                if (ok && v <= QQUICKSTYLEDPARSER_COORD_LIMIT)
++                    image->size.setHeight(v);
++                else
++                    qCWarning(lcStyledText) << "Invalid height provided for <img>";
+             } else if (attr.first == QLatin1String("align")) {
+                 if (attr.second.toString() == QLatin1String("top")) {
+                     image->align = QQuickStyledTextImgTag::Top;

diff --git a/mingw-qt5-qtdeclarative.spec b/mingw-qt5-qtdeclarative.spec
index 490cb8f..b987164 100644
--- a/mingw-qt5-qtdeclarative.spec
+++ b/mingw-qt5-qtdeclarative.spec
@@ -25,7 +25,7 @@
 
 Name:           mingw-qt5-%{qt_module}
 Version:        5.15.18
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Qt5 for Windows - QtDeclarative component
 
 # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
@@ -65,6 +65,9 @@ Patch18: 0019-Revert-QQuickItem-Fix-effective-visibility-for-items.patch
 Patch19: 0020-QML-Fortify-qmlExecuteDeferred-some-more.patch
 Patch20: 0021-QtQml-Clean-up-QQmlData-ctor.patch
 Patch21: 0022-Avoid-undefined-behavior-in-the-JIT.patch
+# Backport fix for CVE-2025-12385
+# https://sources.debian.org/data/main/q/qtdeclarative-opensource-src/5.15.19%2Bdfsg-2/debian/patches/CVE-2025-12385.patch
+Patch22: CVE-2025-12385.patch
 
 ## upstreamable patches
 Patch100: qt5-qtdeclarative-gcc11.patch
@@ -782,6 +785,9 @@ rm -f %{buildroot}%{_prefix}/%{mingw64_target}/lib/pkgconfig/Qt5QmlDevTools.pc
 
 
 %changelog
+* Sat Oct 31 2026 Sandro Mani <manisandro@gmail.com> - 5.15.18-4
+- Backport fix for CVE-2025-12385
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.15.18-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-10-31 15:32 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=179346074735.1.9283920493559258231.rpms-mingw-qt5-qtdeclarative-ed81b35ff0dc@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