Your message dated Sat, 07 Nov 2026 17:19:11 +0000
with message-id <[email protected]>
and subject line Bug#1151189: fixed in qtbase-opensource-src 5.15.19+dfsg-7
has caused the Debian Bug report #1151189,
regarding Qt5 applications crash due to erroneous fallback handling for 
fontconfig
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1151189: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1151189
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libqt5gui5
Version: 5.15.13+dfsg
Severity: important

Dear Maintainers (dear Dmitry, if I've just assembled my new package knowledge correctly ;),

Qt has a confirmed bug in fallback handling for fontconfig that causes arbitrary crashes in every Qt-based application.

Here is the respective debug trace snippet from my machine:

Thread 1 "keepassxc" received signal SIGSEGV, Segmentation fault.
0x00007ffff1e41d51 in ?? () from /lib/x86_64-linux-gnu/libfontconfig.so.1
(gdb) bt
#0 0x00007ffff1e41d51 in ??? () at /lib/x86_64-linux-gnu/libfontconfig.so.1 #1 0x00007ffff1e424f7 in FcCharSetHasChar () at /lib/x86_64-linux-gnu/libfontconfig.so.1 #2 0x00007ffff1f6b900 in ??? () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #3 0x00007ffff682a383 in QFontEngineMulti::stringToCMap (this=<optimized out>, str=<optimized out>, len=<optimized out>, glyphs=<optimized out>, nglyphs=0x7fffffffb7fc, flags=...) at text/qfontengine.cpp:1933

In my specific case KeePassXC suddenly began to crash when I tried to open sub-folders or even when I only tried to select "About" within the menu. This behaviour apparently started after the fontconfig package received an update.

Some debugging and researching then lead to the discovery that this indeed is a bug in Qt and that it luckily already has been fixed upstream:
https://codereview.qt-project.org/c/qt/qtbase/+/750214

The commit:
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=80ddc8dee6a05cd6

But sadly it only made it into the very recent Qt6 versions mentioned in the commit.

I'm new to this and never have filed a bug for any distro before. Here is what I've done so far: - Built Qt5 and Qt6 from source and can confirm that the patch fixes the issues (Qt5 drop-in replacement: libQt5XcbQpa.so.5.15.13).
- Followed these instructions to create a patch:
https://salsa.debian.org/qt-kde-team/qt/qtbase/-/blob/master/debian/README.source

There I've verified that the fix is not already part of debian/patches.

Now I would appreciate some guidance how to proceed with the patch / backporting to other Qt versions, since all versions below Qt6 are affected.

Is it sufficient to supply the patch (as attached to this mail)? I can offer to create an account and merge request on Salsa, as well as help backporting, if you like.

Note that I ran into the issue on Linux Mint 22.3 (Zena), based on Ubuntu 24.04 (Noble), obviously based on Debian :) So I would be grateful for any hints if and how I shall provide the patch downstream as well. I'm actually a bit overwhelmed with all the possible ways where, whom and how to provide the patch.

Please find the patch for Qt5 attached and let me know if I can assist any further.

Thanks and have a great weekend,
Michael
From ed1117d84851007fd2bb6bf7fa45e8985c0e3067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Imre=20P=C3=A9ntek?= <[email protected]>
Date: Sat, 17 Oct 2026 22:46:26 +0200
Subject: [PATCH] Fix crash when fontconfig fallback pattern has no charset

QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter() passed
the address of an uninitialized FcCharSet* to FcPatternGetCharSet()
and then called FcCharSetHasChar() on it without checking the result.
A pattern returned by FcFontMatch() is not guaranteed to carry an
FC_CHARSET element: fontconfig treats the charset as optional, and
caches produced by other fontconfig builds (e.g. a bundled snapshot
that indexed .woff/.woff2 files it could not parse as empty patterns)
can legally serve charset-less patterns. In that case the uninitialized
pointer is dereferenced inside FcCharSetHasChar() and the process
crashes with SIGSEGV; builds hardened with
-ftrivial-auto-var-init=pattern crash deterministically at 0xfefe...

Observed in the wild on Arch/Manjaro after the fontconfig 2.18.1
upgrade: every Qt application (Qt Creator, CopyQ, KeePassXC, ...)
crashed in FcCharSetHasChar via QFontEngineMulti::glyphIndex() as soon
as any glyph fallback lookup ran, because stale fontconfig caches
served a charset-less pattern for every FcFontMatch() call.

Initialize the pointer and check the FcPatternGetCharSet() result.
When no charset can be obtained, keep the optimistic default (load the
engine) exactly as we already do when no match pattern is available,
so glyph coverage is decided by the font engine itself.

Pick-to: 6.12 6.11 6.8
Change-Id: I18687e0a7b7a0019a459155395636768ad9ea964
Reviewed-by: Joerg Bornemann <[email protected]>
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=80ddc8dee6a05cd6

Signed-off-by: Michael Schuster <[email protected]>
---
 .../fontconfig/qfontenginemultifontconfig.cpp             | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
index cbf0793d..70345b69 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
@@ -61,9 +61,11 @@ bool QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int at, uint u
     bool charSetHasChar = true;
     FcPattern *matchPattern = getMatchPatternForFallback(at - 1);
     if (matchPattern != nullptr) {
-        FcCharSet *charSet;
-        FcPatternGetCharSet(matchPattern, FC_CHARSET, 0, &charSet);
-        charSetHasChar = FcCharSetHasChar(charSet, ucs4);
+        FcCharSet *charSet = nullptr;
+        if (FcPatternGetCharSet(matchPattern, FC_CHARSET, 0, &charSet) == FcResultMatch
+            && charSet != nullptr) {
+            charSetHasChar = FcCharSetHasChar(charSet, ucs4);
+        }
     }
 
     return charSetHasChar;
-- 
2.43.0


--- End Message ---
--- Begin Message ---
Source: qtbase-opensource-src
Source-Version: 5.15.19+dfsg-7
Done: Dmitry Shachnev <[email protected]>

We believe that the bug you reported is fixed in the latest version of
qtbase-opensource-src, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dmitry Shachnev <[email protected]> (supplier of updated qtbase-opensource-src 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 07 Nov 2026 19:53:34 +0300
Source: qtbase-opensource-src
Architecture: source
Version: 5.15.19+dfsg-7
Distribution: unstable
Urgency: medium
Maintainer: Debian Qt/KDE Maintainers <[email protected]>
Changed-By: Dmitry Shachnev <[email protected]>
Closes: 1151189 1152313 1152937
Changes:
 qtbase-opensource-src (5.15.19+dfsg-7) unstable; urgency=medium
 .
   * Backport upstream patch to prevent out-of-bounds read in QJsonDocument
     fromBinaryData (CVE-2026-101201, closes: #1152313).
   * Backport upstream patch to fix crash converting an empty URL CBOR tag
     to JSON (CVE-2026-105924, closes: #1152937).
   * Backport upstream patch to fix crash when fontconfig fallback pattern
     has no charset (closes: #1151189).
Checksums-Sha1:
 3d2f98d5c23d0fa60f5b6a09fe8ff6b5d17438d3 5470 
qtbase-opensource-src_5.15.19+dfsg-7.dsc
 8c703ee587cf63c938ecfea6c655bf50afc85a23 240064 
qtbase-opensource-src_5.15.19+dfsg-7.debian.tar.xz
 fee64825947bbe4479dbac6a702d1f5048071d63 17995 
qtbase-opensource-src_5.15.19+dfsg-7_source.buildinfo
Checksums-Sha256:
 2172e8d35ead304f624ecbd8cc734e0dc321dc8ecb272837a4e86af2db1873ba 5470 
qtbase-opensource-src_5.15.19+dfsg-7.dsc
 a65ebcca7a40b767b91661619fdbbbb31861e878125d8e3954960d0c4e4f7131 240064 
qtbase-opensource-src_5.15.19+dfsg-7.debian.tar.xz
 9b818e04254cf3724ad5fe93b40122fc0ab576ced1b90423f42ea64c1086f7ff 17995 
qtbase-opensource-src_5.15.19+dfsg-7_source.buildinfo
Files:
 92d6235e24601bc0c314d429567fff99 5470 libs optional 
qtbase-opensource-src_5.15.19+dfsg-7.dsc
 38033e6d04c7ecf996969baa25d97d9e 240064 libs optional 
qtbase-opensource-src_5.15.19+dfsg-7.debian.tar.xz
 86d6b3eb5c7f9daf85ade9595bce567f 17995 libs optional 
qtbase-opensource-src_5.15.19+dfsg-7_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJHBAEBCgAxFiEE8kKZ/xu8kBi5BqTLYCaTbS8ciuAFAmrvWKgTHG1pdHlhNTdA
ZGViaWFuLm9yZwAKCRBgJpNtLxyK4Db1D/40D6zSZimuXA9A2wJeHdGrkFK+thl8
VRVC/kL9kd+HrH2YzkaA6FRpv4nCI7IpSJmMSd9E/4FmAqs67G/00VyZ+aCY/u3z
kQNjD0x2OgldfUbQdUvcep2y1MLrUiUXIkZXmIjGReCwKpxVZ+wrXavUPESwd90X
HvsnKEivEPk+MJIHGpt6zp/V8PiNHCFt68DZs4DmiOUq29SZobfpA1i50KjLHJH+
S8FaO2BIGmWlJzKcjlXvoNPy7FtPPfcRtgdkQffZ2WOZEOEkRWLZlNOk21PmYCX9
yG0HxVCKjtBaUOKwLaYIcq7xKutWsm7EU9JQtubCmJbaEC+cPlNfbv1b7zTIyLGR
TkgtjUZxuBW3aFljO5YbEIFvFUym2wchhO7ycYM4ucRR19Zl9yTOBK8JIrlG80yO
bL7nDpysaZSJ/mxMrAmmVp6Q8Cpgr4eEP1NIWQbXm5inDVwf/SBcHVJxEfAw0HDb
J3UvcU8OnkjXRsa9N+FYEX4E/E0l+6tvz2CwCDXyGDNUHYbF1YYWvWtWXwHzoVf9
36npCnFNKtt1dC0hGho9wtvO/AEXTo3sLFYCcywTHrn0HwaPiYfPuQUA1WgpQS9Z
GlzwaMjf8dDlr3LBUBHr03/sisfsjHXc91SCoWOG1RUp1ux/A/jOJPc30WyZui6K
6uEy0m77OHEDbA==
=qnQs
-----END PGP SIGNATURE-----

Attachment: pgp5ExOqi_WyD.pgp
Description: PGP signature


--- End Message ---

Reply via email to