diff --git a/CVE-2025-5683.patch b/CVE-2025-5683.patch new file mode 100644 index 0000000000000000000000000000000000000000..c82bfcbc9e063aa99abd928e906b09f1c0217fae --- /dev/null +++ b/CVE-2025-5683.patch @@ -0,0 +1,43 @@ +From efd332516f510144927121fa749ce819b82ec633 Mon Sep 17 00:00:00 2001 +From: Samuel Gaist +Date: Fri, 09 May 2025 17:12:49 +0200 +Subject: [PATCH] Fix validation issue for ICNS image + +The header validation logic could trigger an assert when an invalid ICNS +image was loaded. This patch fixes the validation logic. + +Credit to OSS-Fuzz + +Fixes: QTBUG-136707 +Pick-to: 6.9 6.8 6.5 +Change-Id: I9571b9fd0b53d07ceee9792c9418472e949eff30 +Reviewed-by: Eirik Aavitsland +--- + +diff --git a/src/plugins/imageformats/icns/qicnshandler.cpp b/src/plugins/imageformats/icns/qicnshandler.cpp +index 6cf74b2..501394d 100644 +--- a/src/plugins/imageformats/icns/qicnshandler.cpp ++++ b/src/plugins/imageformats/icns/qicnshandler.cpp +@@ -324,8 +324,11 @@ + + static inline bool isBlockHeaderValid(const ICNSBlockHeader &header, quint64 bound = 0) + { +- return header.ostype != 0 && (bound == 0 +- || qBound(quint64(ICNSBlockHeaderSize), quint64(header.length), bound) == header.length); ++ return header.ostype != 0 && ++ (bound == 0 || ++ // qBound can be used but requires checking the limits first ++ // this requires less operations ++ (ICNSBlockHeaderSize <= header.length && header.length <= bound)); + } + + static inline bool isIconCompressed(const ICNSEntry &icon) +@@ -870,7 +873,7 @@ + return false; + + const qint64 blockDataOffset = device()->pos(); +- if (!isBlockHeaderValid(blockHeader, ICNSBlockHeaderSize + filelength - blockDataOffset)) { ++ if (!isBlockHeaderValid(blockHeader, ICNSBlockHeaderSize - blockDataOffset + filelength)) { + qWarning("QICNSHandler::scanDevice(): Failed, bad header at pos %s. OSType \"%s\", length %u", + QByteArray::number(blockDataOffset).constData(), + nameFromOSType(blockHeader.ostype).constData(), blockHeader.length); diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index b9fd28993f45e95b8f4f0a099cefeb810c36f8d6..ef7a9fe2d5a07ddd959724fe5144f6ccba5a8bb6 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -34,7 +34,7 @@ BuildRequires: pkgconfig(libsystemd) Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.15.2 -Release: 18 +Release: 19 # See LGPL_EXCEPTIONS.txt, for exception details @@ -136,6 +136,7 @@ Patch1002: qtbase5.15-CVE-2023-51714.patch Patch1003: CVE-2023-45935.patch Patch1004: CVE-2025-30348.patch Patch1005: CVE-2025-5455-qtbase-5.15.patch +Patch1006: CVE-2025-5683.patch # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. # Those themes are there for platform integration. If the required libraries are @@ -1007,6 +1008,9 @@ fi %changelog +* Thu Oct 16 2025 yujingbo - 5.15.2-19 +- fix CVE-2025-5683 + * Sat Jun 07 2025 Funda Wang - 5.15.2-18 - fix CVE-2025-5455