Repository navigation
ci: drop external DTD from minimal fontconfig to avoid expat NULL-deref crash - #322909
Merged
Alexandru Dima (alexdima) merged 1 commit intoJun 25, 2026
Merged
Conversation
…ef crash
The Linux smoke-test job works around the expat 2.6.1 fontconfig NULL-deref
CVEs by pointing FONTCONFIG_FILE at a minimal config with <include> removed.
However that config still declared an external DTD:
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
fontconfig feeds that DTD to expat as an external *parameter* entity, which
still hits the not-yet-backported CVE-2026-32776 / CVE-2026-32778 crash paths
on expat 2.6.1 even with <include> gone. This was observed in CI as a SIGSEGV
inside libexpat (called from libfontconfig) during Chromium browser-process
font initialization, which crashed Electron at startup. Because the smoke-test
launch used no timeout, that crash surfaced only as an opaque 120s Mocha
"before all" hook timeout.
fontconfig does not require the DOCTYPE, so drop it to remove the last
external-entity codepath. The full workaround can be removed once the runner
ships libexpat >= 2.7.5 (the step already auto-disables itself in that case).
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Linux test workflow’s “minimal fontconfig” workaround to eliminate all expat external-entity parsing paths by removing the external <!DOCTYPE … SYSTEM "urn:fontconfig:fonts.dtd"> declaration from the generated /tmp/fonts-minimal.conf. This aligns with the stated goal of avoiding expat 2.6.1 NULL-deref crash paths during Chromium/Electron font initialization on Ubuntu runners.
Changes:
- Expand the workaround rationale to explicitly cover the external DTD/parameter-entity path and document the observed Electron startup crash signature.
- Remove the external DOCTYPE line from the heredoc-generated minimal fontconfig XML.
- Keep the existing version gate that disables the workaround when
libexpat1 >= 2.7.5is present.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/pr-linux-test.yml | Removes the external DTD reference from the minimal fontconfig config generated in the workflow to avoid expat external-entity parsing crash paths. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Alexandru Dima (alexdima)
enabled auto-merge (squash)
June 25, 2026 09:59
Ulugbek Abdullaev (ulugbekna)
approved these changes
Jun 25, 2026
Ladislau Szomoru (lszomoru)
approved these changes
Jun 25, 2026
This was referenced Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the external DTD declaration from the minimal fontconfig config that the Linux smoke-test job installs as a workaround for the expat 2.6.1 NULL-deref CVEs.
<?xml version="1.0"?> - <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> <fontconfig>Why
The job already sets
FONTCONFIG_FILE=/tmp/fonts-minimal.confwith<include>removed to avoid the expat external-entity crash path. But a flaky smoke-test failure (run 28140700565,Linux / Electron-Smoke) still crashed with that workaround active.I pulled the crash-dump artifact and walked the minidump. The faulting thread was a SIGSEGV (NULL deref, fault address 0x0) with this native stack:
i.e. the crash is in libexpat called from libfontconfig during Chromium's browser-process font initialization at startup — not in VS Code/Chromium logic. The dump confirms
FONTCONFIG_FILE=/tmp/fonts-minimal.confwas in effect and the minimal config was loaded.The remaining trigger is the
<!DOCTYPE … SYSTEM "urn:fontconfig:fonts.dtd">line: fontconfig feeds that DTD to expat as an external parameter entity, which still hits the not-yet-backportedCVE-2026-32776/CVE-2026-32778NULL-deref paths on expat 2.6.1 even after<include>was removed. fontconfig does not require the DOCTYPE, so dropping it removes the last external-entity codepath.Validation
safe_load).ElementTree.parsedoes not fetch external DTDs, so it is unaffected.Notes for reviewers
libexpat >= 2.7.5on the runner; the step already auto-disables the whole workaround when it detects that version.before allhook timeout.Co-authored-by: Copilot [email protected]