Skip to content

deps: take sqlx's libsqlite3-sys cap lift for RUSTSEC-2026-0459 - #197

Merged
fieldmouseworks-steward[bot] merged 1 commit into
mainfrom
claude/196-sqlite-advisory
Nov 9, 2026
Merged

fieldmouseworks-steward[bot] merged 1 commit into
mainfrom
claude/196-sqlite-advisory

Conversation

@fieldmouseworks-workers

Copy link
Copy Markdown
Contributor

Refs #196

What: RUSTSEC-2026-0459 (CVE-2026-119375, GHSA-72w2-rjgg-q729): the SQLite that libsqlite3-sys bundles before 3.54.0 can return uninitialized page-cache memory when a database is opened with a crafted sibling -wal file whose page size differs. We compile in the bundled SQLite (sqlx sqlite turns on sqlite-bundled), and restores and backup-copy checks open files from backup-copy directories, so this applies to us.

Why a patch and not a bump: sqlx-sqlite 0.9.0, the latest release, requires libsqlite3-sys <0.38. Upstream raised the cap in transact-rs/sqlx#4502 (10462fa4), which hasn't been released yet. [patch.crates-io] takes every sqlx crate from that one commit, so they stay one version, and libsqlite3-sys is locked at 0.39.1 (SQLite 3.54.1).

What else comes with it: upstream's 28 post-0.9.0 commits that touch sqlx-core/sqlite/macros. Nearly all are bug fixes (pool idle underflow, sqlite NULL decltype, datetime decoding, migration filename validation, which our NNNN_name.sql files meet). In the lockfile, sha2 0.10 and its digest stack drop out, and objc2-*/web-sys are added for macOS/wasm targets only.

Removal: delete the [patch.crates-io] table once a sqlx release includes #4502 (the comment above the table says so). Dependabot doesn't update git patches.

Rung: none added. advisory-watch (osv-scanner on remi) is the existing guard that caught this and will catch a regression.

Roles: integrator only. This is a dependency change whose acceptance comes from the gate sequence, so nothing was delegated.

Verification: the local cargo xtask proof result for f82c02c follows in a comment. CI results are on the PR checks.

🤖 Generated with Claude Code

The bundled SQLite before 3.54 can return uninitialized memory for a
crafted database and -wal pair, and restores open files from backup-copy
directories. sqlx 0.9.0 caps libsqlite3-sys below 0.38, so the sqlx crates
come from the upstream commit that lifts the cap (transact-rs/sqlx#4502)
until a release has it, and libsqlite3-sys is locked at 0.39.1
(SQLite 3.54.1).

Refs #196

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fieldmouseworks-steward fieldmouseworks-steward Bot added the waiting: review Its reviewers, or a Claude job judging it, are looking at this head label Nov 9, 2026

@fieldmouseworks-steward fieldmouseworks-steward Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex review of f82c02c: nothing found.

No merge-blocking defects found; build and test gates were not run because Rust and Nix tools are unavailable.

@fieldmouseworks-steward fieldmouseworks-steward Bot added waiting: merge Settled and green: being merged by the steward, GitHub or its dependency bot and removed waiting: review Its reviewers, or a Claude job judging it, are looking at this head labels Nov 9, 2026
@fieldmouseworks-steward
fieldmouseworks-steward Bot merged commit 82db244 into main Nov 9, 2026
22 checks passed
@fieldmouseworks-steward
fieldmouseworks-steward Bot deleted the claude/196-sqlite-advisory branch November 9, 2026 10:44
@fieldmouseworks-steward fieldmouseworks-steward Bot removed the waiting: merge Settled and green: being merged by the steward, GitHub or its dependency bot label Nov 9, 2026
@fieldmouseworks-workers

Copy link
Copy Markdown
Contributor Author

Local proof on f82c02c (cargo xtask proof --chromium with a Nix-store Chromium 157, run in a heavy slot on remi). Receipt sha256 845bcb2a9fdda735755837be4aa60fdde553dc9a92b48cc3e0de425eeb24cb2d. Steps 1–6 passed: guidance guard, web ci/check/build, fmt, clippy -D warnings, cargo test --workspace, server build. Step 7 e2e: 69 passed, 1 failed (drafts.spec.ts:113, timeout). The same spec fails 6/6 on both this head and the parent bdd156a under the host's load (avg 36–60), each time at a different step, so it isn't from this change. Tracked in #199. CI (pr-gate including e2e, flake, release builds for both architectures) was green on this head.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant