Skip to content

Revert the vendored glib patch once Tauri depends on glib >= 0.20 (GHSA-wrw7-89jp-8q8g) #530

Open

Description

@stuffbucket

Why

The Tauri shell's Linux dependency tree locks glib 0.18.5, which has GHSA-wrw7-89jp-8q8g / RUSTSEC-2024-0429: VariantStrIter::impl_get passes &p instead of &mut p to a variadic C out-argument, so current compilers read a NULL pointer and crash. The fix (gtk-rs-core#1343) shipped in glib 0.20 and was never backported to 0.18.

We can't upgrade on our own. Even the latest Tauri (2.12.5), wry (0.57.1) and tao (0.37.2) require gtk ^0.18, and webkit2gtk 2.0.2, the latest release, requires glib ^0.18.

Dependabot alert #3 was dismissed as vulnerable code not used, and the bug is now patched locally (see below):

  • The only way to reach the bug is Variant::array_iter_str().
  • None of the 544 crates in shell/src-tauri/Cargo.lock calls it except glib's own tests. That includes the Linux-only crates.
  • Our shell code doesn't call it either.
  • Linux now has a packaged desktop shell, so the vendored fix continues to protect its transitive GTK stack; see docs/linux.md.

Upstream chain (in order)

gtk 0.19.0 (the GTK3 bindings, maintained again) moves to glib 0.22, which has the fix. A Tauri maintainer confirmed the upgrade is underway (tauri#16264, Oct 12 2026).

Current state: patched locally (#532)

Until the upstream chain ships, the shell uses a vendored glib 0.18.5 with the same two-line fix as gtk-rs-core#1343: shell/src-tauri/patches/glib-0.18.5, wired in through [patch.crates-io] in shell/src-tauri/Cargo.toml. On Linux (rust 1.99.1), glib's own variant_iter tests crash with SIGSEGV on the crates.io crate and pass on the patched one.

patches/ now also contains the live tauri-plugin-shell patch added by #579. The eventual cleanup must remove only the glib patch.

Revert only the glib patch when the mainline dependency has the fix

Once a stable Tauri version used by Maximal resolves to glib ≥ 0.20:

  • Upgrade tauri and its plugins in shell/src-tauri/Cargo.toml to that release.
  • Remove only the glib advisory comment and glib = { path = "patches/glib-0.18.5" } from [patch.crates-io]. Keep the section and the tauri-plugin-shell entry while that patch remains.
  • Delete only shell/src-tauri/patches/glib-0.18.5/. Do not delete shell/src-tauri/patches/tauri-plugin-shell-2.6.0/.
  • Keep .github/codeql/codeql-config.yml's shell/src-tauri/patches exclusion while any vendored patch remains. Remove it only when the directory is actually empty; tests/codeql-languages.test.ts guards literal missing paths.
  • Run cargo update in shell/src-tauri, then confirm cargo tree -i glib --target x86_64-unknown-linux-gnu shows glib ≥ 0.20 from crates.io and no 0.18.x.
  • Confirm the Linux, macOS, and Windows release builds still pass. For the Windows development build, dispatch windows-shell-dev.yml.

Re-check before then if

  • Anything else in the tree depends on glib 0.18 in a way the patch doesn't cover, for example a second copy of glib under a different version.
  • cargo update ever reports that the [patch.crates-io] glib entry is unused. That means the tree moved off 0.18.5 and the patch is no longer applied, so revert it as above.

Activity

  1. changed the title [-]Upgrade the Tauri shell to gtk 0.19 / glib 0.22 when Tauri releases it (GHSA-wrw7-89jp-8q8g)[/-] [+]Revert the vendored glib patch once Tauri depends on glib >= 0.20 (GHSA-wrw7-89jp-8q8g)[/+] on Oct 27, 2026
  2. stuffbucket commented on Nov 15, 2026

    @stuffbucket
    OwnerAuthor

    Keep this open until Tauri resolves to a fixed glib. Cleanup must remove only the glib patch: patches/ also contains a live tauri-plugin-shell patch.

  3. added this to the v0.6.0 milestone on Nov 15, 2026
  4. stuffbucket commented on Nov 16, 2026

    @stuffbucket
    OwnerAuthor

    Scope refreshed against origin/main at a43713a0. #532 remains the mitigation and this cleanup issue remains blocked on the upstream Tauri GTK/glib chain. The body now reflects Linux desktop packaging and the second live vendored patch from #579, so the eventual cleanup removes only glib-0.18.5 rather than the whole patch section or directory.

  5. added
    blocked:upstreamWaiting on an upstream release; exclude from release triage until the issue trigger is met
    on Nov 16, 2026
  6. removed this from the v0.6.0 milestone on Nov 16, 2026
  7. stuffbucket commented on Nov 16, 2026

    @stuffbucket
    OwnerAuthor

    Moved out of the v0.6.0 release milestone and marked blocked:upstream. Release milestones track work that can be scheduled; this issue should re-enter release triage only when a stable Tauri version resolves to glib ≥ 0.20 or Cargo reports that the glib patch is unused. Until then, backlog sweeps can exclude label:blocked:upstream without re-evaluating the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked:upstreamWaiting on an upstream release; exclude from release triage until the issue trigger is metdependenciesPull requests that update a dependency fileplaybook:refactoringA structural change that keeps behavior the same

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions