diff --git a/CVE-2025-5683.patch b/CVE-2025-5683.patch new file mode 100644 index 0000000000000000000000000000000000000000..9e01bcf7669e7a4e7c835181c7006e2d7326ba26 --- /dev/null +++ b/CVE-2025-5683.patch @@ -0,0 +1,27 @@ +diff --git a/src/plugins/imageformats/icns/qicnshandler.cpp b/src/plugins/imageformats/icns/qicnshandler.cpp +index 02086cbf26c..207f7cd8393 100644 +--- a/src/plugins/imageformats/icns/qicnshandler.cpp ++++ b/src/plugins/imageformats/icns/qicnshandler.cpp +@@ -359,8 +359,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) +@@ -892,7 +895,7 @@ + return false; + + const qint64 blockDataOffset = device()->pos(); +- if (!isBlockHeaderValid(blockHeader)) { ++ 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-qtimageformats.spec b/qt5-qtimageformats.spec index 58a840958014af3b688733622b9c4649c5042b6b..fdf7e9574bdb57323dc99db91c62e83b50f76218 100644 --- a/qt5-qtimageformats.spec +++ b/qt5-qtimageformats.spec @@ -2,13 +2,15 @@ Name: qt5-%{qt_module} Version: 5.15.10 -Release: 1 +Release: 2 Summary: Qt5 - QtImageFormats component License: LGPLv2 with exceptions or GPLv3 with exceptions Url: http://www.qt.io %global majmin %(echo %{version} | cut -d. -f1-2) Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz +# https://download.qt.io/official_releases/qt/6.5/CVE-2025-5683-qtimageformats-6.5.patch +Patch0: CVE-2025-5683.patch BuildRequires: make BuildRequires: qt5-qtbase-devel >= %{version} @@ -65,6 +67,9 @@ make install INSTALL_ROOT=%{buildroot} %{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_*Plugin.cmake %changelog +* Thu Oct 16 2025 Funda Wang - 5.15.10-2 +- fix CVE-2025-5683 + * Mon Aug 21 2023 huayadong - 5.15.10-1 - update to version 5.15.10-1