Repository navigation
fix(deps): take Electron 43.7.0 for the glibc environ use-after-free (#20081) - #20089
Conversation
Electron 43.5.0 wraps `gtk_init()` in `setenv("GDK_GL","disable")` /
`unsetenv` and, in the same change, moves FontConfig warm-up onto a
thread-pool thread that runs concurrently. Below glibc 2.41 `setenv`
frees the old `environ`, so the FontConfig thread's `getenv()` reads
freed memory — a browser-process use-after-free about a second into
startup, on every Linux we ship to (Ubuntu 20.04-24.04 are 2.31-2.39).
That is what 1.4.199/1.4.200 shipped. The corruption surfaces wherever
the next allocation lands, which is why the reports name unrelated
frames (gtk_widget_realize, libxcb-dri3, expat) and read as an NVIDIA
GPU fault: no GPU child is involved, and Safe Graphics could not have
helped even if it ran on Linux.
43.7.0 carries electron#53491, which overrides setenv/unsetenv/putenv/
clearenv so a published `environ` is never freed and defers to glibc on
2.41+. Chromium is unchanged at 150.0.7871.250, so this is the fix and
nothing else.
Fixes #20081
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Electron 43.6.0 → 43.7.0 — takes the fix for the glibc
environuse-after-free (electron#53491, backported to 43-x-y as #53510) that caused the 1.4.199/1.4.200 launch SIGSEGV on Linux. - Runtime-floor guard test —
config/scripts/electron-runtime-floor.test.tspins Electron at or above 43.7.0 and would fail on a downgrade. - Docs — a "Runtime floor" section in
docs/reference/linux-glibc-compatibility.mdrecords the constraint; the referenced startup symbols (patchPackagedProcessPath,configureOrcaUserDataPathEnv,hydrateShellPath) all exist. - Workspace config —
[email protected]added tominimumReleaseAgeExclude(released 2026-09-10, under the 3-day gate) plus lockfile regeneration.
I independently confirmed the load-bearing claims: v43.7.0 exists and its release notes carry the Linux process.env concurrent read/write crash fix (the #53510 43-x-y backport of #53491), and Node moved to 24.21.0 as stated. The guard test is a real tripwire, not theatre — its meetsRuntimeFloor assertions are exact and a downgrade to 43.6.0 fails. The one open item is the one the PR body already discloses: it has not been confirmed on the reporter's Ubuntu + NVIDIA/X11 hardware (only a macOS boot-smoke), so a test build against the original repro is still worth doing before release.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
📝 WalkthroughWalkthroughAdds a test that enforces Electron version 43.7.0 or newer. Updates the Electron development dependency and workspace release-age exception to 43.7.0. Documents a Linux glibc below 2.41 startup race, its impact on Electron 43.5.0 and later, and the Electron 43.7.0 fix. Priority: ⬆️ High Severity of issue fixed: Medium Merge Risk: 🟡 Moderate · up to A prerelease Electron version can bypass the required stable runtime floor and reintroduce the Linux startup crash. Update the version validation before merging. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description provides a detailed problem statement, root cause, fix, linked issue, scope, and verification results. However, it omits several template sections, including ELI5, Visual Proof with an explicit N/A if applicable, Review, Agent skill upstream boundary, Notes, and the Checklist. Resolution Add the missing template sections. Include an ELI5 summary, state N/A with a reason or attach visual proof, complete the Review, Agent skill upstream boundary, Notes, and Checklist sections, and record the relevant testing and cross-platform considerations. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: cbd3b9f8-0589-47b4-bc2a-1d9a9b858103
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
config/scripts/electron-runtime-floor.test.tsdocs/reference/linux-glibc-compatibility.mdpackage.jsonpnpm-workspace.yaml
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
| const MINIMUM_ELECTRON_VERSION = '43.7.0' | ||
|
|
||
| function parseVersion(specifier: string): [number, number, number] { | ||
| const match = /(\d+)\.(\d+)\.(\d+)/.exec(specifier) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Validate the Electron dependency as an npm semver range, not by extracting a numeric triple.
parseVersion treats 43.7.0-beta.1 as 43.7.0, so meetsRuntimeFloor returns true. An explicit prerelease dependency update can therefore bypass the stable 43.7.0 floor and reintroduce the Linux launch crash. Use a semver range parser that rejects prerelease minimums while accepting stable ranges such as ^43.7.0 and ~43.7.0. Add tests for both cases.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const match = /(\d+)\.(\d+)\.(\d+)/.exec(specifier) | |
| const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(specifier) |
🧰 Tools
🪛 OpenGrep (1.28.0)
[ERROR] 16-16: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)

Fixes #20081 — Orca 1.4.199/1.4.200 SIGSEGV on launch on Linux.
What actually broke
Not the GPU. Electron 43.5.0 (electron#53070) started wrapping
gtk_init()insetenv("GDK_GL","disable")/unsetenv(…), and in the same change moved FontConfig warm-up onto a thread-pool thread that runs concurrently with toolkit init.Below glibc 2.41,
setenv/unsetenvreallocate theenvironarray and free the old one. FontConfig callsgetenv()constantly. So the browser process reads freed memory about a second into startup. Every Linux target we support is under that line (Ubuntu 20.04–24.04 = glibc 2.31–2.39).That explains every detail in the report:
gtk_widget_realize→ libxcb-dri3 on first keystrokeUpstream saw the same thing from the other end: electron#53200 — "Linux SIGTRAP: PartitionAlloc freelist corruption detected during Fontconfig startup" — and the ASan shards were "crashing in fontconfig's
getenv()at startup."The fix
Electron 43.7.0 carries electron#53491: it overrides
setenv/unsetenv/putenv/clearenvprocess-wide so a publishedenvironis never freed (glibc's own 2.41 approach), and defers to glibc on 2.41+. Backported to 42/43/44/45.Chromium is unchanged at
150.0.7871.250between 43.6.0 and 43.7.0 — Node goes 24.20.0 → 24.21.0 (ABI 148, unchanged). This is the fix and nothing else.Also in this PR
config/scripts/electron-runtime-floor.test.ts— fails the suite if the Electron pin ever drops below 43.7.0. Orca is a first-class trigger for this race, not a bystander:patchPackagedProcessPath,configureOrcaUserDataPathEnv, andhydrate-shell-pathall writeprocess.envduring early startup.docs/reference/linux-glibc-compatibility.mdrecording the constraint.Verification
pnpm tc— cleanpnpm test src/main/startup config/scripts/electron-runtime-floor.test.ts— 501 passed, 8 skippedpnpm run check:code-quality:changed— 0 new findingspnpm run build:electron-vite— cleanElectron/43.7.0 Chrome/150.0.7871.250Not verified on the reporter's hardware — I have no Ubuntu + NVIDIA/X11 box. Needs a test build from this branch confirmed against the original repro.