Repository navigation
fix(deps): bump rusqlite to 0.41.1 for RUSTSEC-2026-0459 - #555
Merged
Merged
Conversation
libsqlite3-sys 0.30.1 bundles SQLite 3.46, which can return uninitialized page-cache memory when a database is opened together with a sibling -wal file of a different page size (CVE-2026-119375). The Modrinth App import reader opens app.db read-only, including from a folder the user picks, so the runtime path is reachable. rusqlite 0.41.1 pulls libsqlite3-sys 0.39.1 (SQLite 3.54.1). default-features = false drops the two 0.41 defaults the reader does not use: the prepared-statement cache (hashlink) and the wasm32-unknown-unknown FFI crate. hashlink 0.9.1 and ahash 0.8.12 leave the lock; no other edge moves (772 -> 770 packages).
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
cargo-denywent red on 2026-11-10 (first seen on Weblate PR #554, run 42786224734), soci-gateblocks every PR, andmain's next run would fail the same way. One new RustSec entry:libsqlite3-sys0.30.1 (bundles SQLite 3.46.0) ←rusqlite0.32.1-walof a different page sizerusqlite→ 0.41.1, which pullslibsqlite3-sys0.39.1 (SQLite 3.54.1). Patched:libsqlite3-sys >= 0.39.0, first shipped withrusqlite0.41.This is a runtime path with an upstream fix, so the fix is the bump;
deny.tomlis untouched and nothing is ignored.Where SQLite runs: only the Modrinth App import reader (
instances/import/readers/modrinth_app.rs) opens that launcher'sapp.dbread-only. Auto-discovery opens theapp.dbthat Modrinth App itself wrote. The manual "pick a folder" path (launcher_import_inspect_folder→detect_folder→ModrinthAppReader::detect) opens<picked>/../app.db, so a copied folder from someone else can supply a craftedapp.db+-walpair. Query results become profile name/version strings in the import dialog and, on import, in the new instance. Nothing goes over the network.Changes
src-tauri/Cargo.toml:rusqlite = { version = "0.41", default-features = false, features = ["bundled"] }, plus an extended justification comment. 0.41's defaults arecache(addshashlink; the reader callsprepare, neverprepare_cached) andffi-sqlite-wasm-rs(a wasm32-unknown-unknown-only crate that would still land in the lock and in cargo-deny's all-targets graph). Neither is used, so both are off.src-tauri/Cargo.lock:rusqlite0.32.1 → 0.41.1,libsqlite3-sys0.30.1 → 0.39.1,hashlink0.9.1 andahash0.8.12 removed. Their only path was rusqlite's old cache, andhashbrown0.14.5 loses itsahashedge as a result.modrinth_app.rsbuilds as is against 0.41 (see Verification).[Unreleased]→### Security, with the ru twin (### Безопасность) in the same position.cargo-deny justification
No crate is added; two are removed (772 → 770 packages).
rusqlitestays MIT, andlibsqlite3-sysstays MIT with public-domain SQLite.bundledstill compiles SQLite from vendored C, so there is still no system-sqlite dependency.API drift 0.32 → 0.41 (release notes for every version read)
preparerejects multiple statements andexecuterejects a trailing statement. The reader prepares one statement, and the tests useexecute_batch, which allows several.u64/usizeToSql/FromSqlare off by default. The reader readsString,Option<String>andOption<i64>.rust-version,rust-toolchain.tomlisstable, and every CI job installstoolchain: stable.libsqlite3-sysuser:cargo tree -i libsqlite3-sys -e all --target allshows onlyrusqlite← lucerna.Lock hygiene
cargo update -p rusqlitetouched only the packages listed above. No unrelated edge moved, so no hand revert was needed.cargo metadata --lockedexits 0.Verification
cargo deny check(0.19.8, CI's pin) on the base and the new lock, after an index refresh. Findings diffed by kind + crate: the one advisory error is gone and nothing is added (82 warnings on both sides, same set). Result:advisories ok, bans ok, licenses ok, sources ok.rusqlite =0.41.1with the same features, same lock checksums, andread_rowscopied verbatim. It compiles with no warnings and reports bundled SQLite 3.54.1. It reads (a) a rollback-journal DB like the unit tests build, with the negative-memory clamp; (b) a WAL DB with an un-checkpointed-walwhile the writer still holds it open, which is Modrinth App's own shape; (c) a missing file and a garbage file, which give an empty result without a panic.modrinth_apptests are left to CI.Test plan
cargo-deny,rust-*(themodrinth_apptests) andci-gate