Repository navigation
deps: take sqlx's libsqlite3-sys cap lift for RUSTSEC-2026-0459 - #197
Conversation
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]>
There was a problem hiding this comment.
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.
|
Local proof on f82c02c ( |
Refs #196
What: RUSTSEC-2026-0459 (CVE-2026-119375, GHSA-72w2-rjgg-q729): the SQLite that
libsqlite3-sysbundles before 3.54.0 can return uninitialized page-cache memory when a database is opened with a crafted sibling-walfile whose page size differs. We compile in the bundled SQLite (sqlxsqliteturns onsqlite-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-sqlite0.9.0, the latest release, requireslibsqlite3-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, andlibsqlite3-sysis 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.sqlfiles meet). In the lockfile,sha20.10 and its digest stack drop out, andobjc2-*/web-sysare 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 proofresult for f82c02c follows in a comment. CI results are on the PR checks.🤖 Generated with Claude Code