Skip to content

Commit

Permalink
qt6-base: Patch CVE-2024-33861
Browse files Browse the repository at this point in the history
Signed-off-by: Reilly Brogan <reilly@reillybrogan.com>
  • Loading branch information
ReillyBrogan committed May 2, 2024
1 parent ccfa24d commit 62f75a9
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 5 deletions.
52 changes: 52 additions & 0 deletions packages/q/qt6-base/files/CVE-2024-33861.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From 7c4e1357e49baebdd2d20710fccb5604cbb36c0d Mon Sep 17 00:00:00 2001
From: Fabian Kosmale <fabian.kosmale@qt.io>
Date: Thu, 18 Apr 2024 10:25:21 +0200
Subject: [PATCH] QStringConverterICU: Pass correct pointer to callback
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Pass the pointer to the current state, not a pointer to a pointer to it.

[ChangeLog][QtCore][QStringConverter] Fixed a bug involving moved
QStringEncoder/QStringDecoder objects accessing invalid state.

Amends 122270d6bea164e6df4357f4d4d77aacfa430470.

Done-with: Marc Mutz <marc.mutz@qt.io>
Pick-to: 6.5
Change-Id: I70d4dc00e3e0db6cad964579662bcf6d185a4c34
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 39bbfce9b675c9085ef49c9b9c52c146eca55e4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
src/corelib/text/qstringconverter.cpp | 4 +-
.../qstringconverter/tst_qstringconverter.cpp | 72 +++++++++++--------
2 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp
index b5749843917..fd45ccf2fdd 100644
--- a/src/corelib/text/qstringconverter.cpp
+++ b/src/corelib/text/qstringconverter.cpp
@@ -1954,7 +1954,7 @@ struct QStringConverterICU : QStringConverter
const void *context;
ucnv_getToUCallBack(icu_conv, &action, &context);
if (context != state)
- ucnv_setToUCallBack(icu_conv, action, &state, nullptr, nullptr, &err);
+ ucnv_setToUCallBack(icu_conv, action, state, nullptr, nullptr, &err);

ucnv_toUnicode(icu_conv, &target, targetLimit, &source, sourceLimit, nullptr, flush, &err);
// We did reserve enough space:
@@ -1987,7 +1987,7 @@ struct QStringConverterICU : QStringConverter
const void *context;
ucnv_getFromUCallBack(icu_conv, &action, &context);
if (context != state)
- ucnv_setFromUCallBack(icu_conv, action, &state, nullptr, nullptr, &err);
+ ucnv_setFromUCallBack(icu_conv, action, state, nullptr, nullptr, &err);

ucnv_fromUnicode(icu_conv, &target, targetLimit, &source, sourceLimit, nullptr, flush, &err);
// We did reserve enough space:
--
GitLab

1 change: 1 addition & 0 deletions packages/q/qt6-base/files/series
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0001-Support-stateless-config-directories.patch
qt6-base-cflags.patch
qt6-base-nostrip.patch
CVE-2024-33861.patch
2 changes: 1 addition & 1 deletion packages/q/qt6-base/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name : qt6-base
version : 6.6.3
release : 22
release : 23
source :
- https://download.qt.io/official_releases/qt/6.6/6.6.3/submodules/qtbase-everywhere-src-6.6.3.tar.xz : 0493fd0b380c4edf8872f011a7f26d245aa4cdd75b349904ef340a22dedf7462
homepage : https://www.qt.io
Expand Down
8 changes: 4 additions & 4 deletions packages/q/qt6-base/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</Description>
<PartOf>programming.library</PartOf>
<RuntimeDependencies>
<Dependency release="22">qt6-base</Dependency>
<Dependency release="23">qt6-base</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib64/qt6/examples/corelib/ipc/localfortuneclient/localfortuneclient</Path>
Expand Down Expand Up @@ -259,7 +259,7 @@
</Description>
<PartOf>programming.devel</PartOf>
<RuntimeDependencies>
<Dependency release="22">qt6-base</Dependency>
<Dependency release="23">qt6-base</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/androiddeployqt6</Path>
Expand Down Expand Up @@ -4113,8 +4113,8 @@
</Files>
</Package>
<History>
<Update release="22">
<Date>2024-03-26</Date>
<Update release="23">
<Date>2024-05-02</Date>
<Version>6.6.3</Version>
<Comment>Packaging update</Comment>
<Name>Reilly Brogan</Name>
Expand Down

0 comments on commit 62f75a9

Please sign in to comment.