Bug 2543912 - qt6-qtbase: backport upstream fix for SIGSEGV in QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter (charset-less fontconfig pattern)
Summary: qt6-qtbase: backport upstream fix for SIGSEGV in QFontEngineMultiFontConfig::...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qt6-qtbase
Version: 44
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Grulich
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-30 12:47 UTC by Renan Andrade
Modified: 2026-10-07 01:39 UTC (History)
2 users (show)

Fixed In Version: qt6-qtbase-6.11.2-3.fc45 qt6-qtbase-6.11.2-3.fc44
Clone Of:
Environment:
Last Closed: 2026-10-05 00:17:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Renan Andrade 2026-09-30 12:47:35 UTC
Every Qt 6 application crashes with SIGSEGV during glyph fallback when
fontconfig returns a fallback pattern that has no FC_CHARSET element. On
KDE Plasma this puts plasmashell into a crash loop at login and also
crashes plasma-keyboard, systemsettings, plasma-discover and kwrite.

Qt 6.11.2 ignores the return value of FcPatternGetCharSet() and passes
an uninitialized pointer to FcCharSetHasChar()
(src/gui/text/unix/qfontenginemultifontconfig.cpp, v6.11.2):

    FcCharSet *charSet;
    FcPatternGetCharSet(matchPattern, FC_CHARSET, 0, &charSet);
    charSetHasChar = FcCharSetHasChar(charSet, ucs4);

Upstream has fixed this:
  dev:  80ddc8dee6a05cd619085e29fc21ff92c4b877a8
        "Fix crash when fontconfig fallback pattern has no charset"
        Change-Id: I18687e0a7b7a0019a459155395636768ad9ea964
        Pick-to: 6.12 6.11 6.8
  6.11: 91d7ff41af58 (cherry-pick, 2026-08-14; not yet in a 6.11.x release)
  6.12: included in v6.12.0

Please backport it to the 6.11.2 build in F44, or rebase to a release
that includes it.

Version-Release number of selected component:
qt6-qtbase-gui-6.11.2-2.fc44.x86_64
fontconfig-2.17.0-4.fc44.x86_64
freetype-2.14.3-1.fc44.x86_64

Reproducible: Always

Steps to Reproduce:
1. sudo dnf install texlive-logix python3-pyside6
   (texlive-logix exposes .woff/.woff2 files under /usr/share/fonts/logix)
2. Confirm fontconfig serves them without a charset:
     fc-match -a "Noto Sans" --format '%{file}|%{fontwrapper}|%{charset}\n' | grep woff
   On this system the four Logix WOFF/WOFF2 entries appear at positions
   2-5 of the sorted list with an empty charset. Every SFNT entry has one.
3. Save as t.py:

   import sys
   from PySide6.QtGui import QGuiApplication, QFont, QFontMetricsF
   app = QGuiApplication(sys.argv)
   fm = QFontMetricsF(QFont("Noto Sans", 10))
   print(fm.tightBoundingRect(sys.argv[1]).width())

4. QT_QPA_PLATFORM=offscreen python3 t.py '☐'
Actual Results:
Segmentation fault (exit 139):

  #4 FcCharSetFindLeafForward () from /lib64/libfontconfig.so.1
  #5 FcCharSetHasChar () from /lib64/libfontconfig.so.1
  #6 QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int, unsigned int) const () from /lib64/libQt6Gui.so.6
  #7 QFontEngineMulti::stringToCMap(...) () from /lib64/libQt6Gui.so.6
  #8 QTextEngine::shapeText(int) const () from /lib64/libQt6Gui.so.6

U+21E7 (⇧) and U+23CE (⏎) crash the same way. Characters that earlier
fallback fonts cover, such as U+2192 (→) and U+2713 (✓), do not.

Expected Results:
The width is printed. With the upstream fix Qt falls back to loading the
engine and lets it decide glyph coverage.

Additional Information:
- Hiding the WOFF/WOFF2 files from fontconfig with <rejectfont> makes the
  crash go away, which confirms the charset-less patterns are the trigger.
- The font side is reported separately against texlive-collection-fontsextra
  (texlive-logix), because web fonts shouldn't be exposed as system fonts.
  Any other font that produces a charset-less pattern would still crash
  Qt without this backport.
- Workaround for affected users,
  ~/.config/fontconfig/conf.d/99-reject-webfonts.conf:

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
    <fontconfig>
      <selectfont><rejectfont>
        <glob>*.woff</glob>
        <glob>*.woff2</glob>
      </rejectfont></selectfont>
    </fontconfig>

Comment 1 Fedora Update System 2026-10-02 06:01:57 UTC
FEDORA-2026-d3e776ebd1 (qt6-qtbase-6.11.2-3.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-d3e776ebd1

Comment 2 Fedora Update System 2026-10-02 06:01:58 UTC
FEDORA-2026-dbda807f6a (qt6-qtbase-6.11.2-3.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-dbda807f6a

Comment 3 Fedora Update System 2026-10-03 02:02:16 UTC
FEDORA-2026-dbda807f6a has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-dbda807f6a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-dbda807f6a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-10-03 02:32:36 UTC
FEDORA-2026-d3e776ebd1 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-d3e776ebd1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-d3e776ebd1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2026-10-05 00:17:27 UTC
FEDORA-2026-dbda807f6a (qt6-qtbase-6.11.2-3.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2026-10-07 01:39:46 UTC
FEDORA-2026-d3e776ebd1 (qt6-qtbase-6.11.2-3.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.