From 671a0ce173ea931b348b0084e0e01804861aff74 Mon Sep 17 00:00:00 2001 From: James Reilly Date: Wed, 18 Nov 2026 18:29:34 +0000 Subject: [PATCH] deps: bump rusqlite to 0.43 (SQLite 3.54.1) and rustix to 1.1.6 cargo-deny fails on main for two advisories. Both are fixed by a bump. RUSTSEC-2026-0459 (CVE-2026-119375): libsqlite3-sys 0.39 still built SQLCipher on SQLite 3.53.4, but libsqlite3-sys 0.40.0 depends on sqlcipher-src 420.0.0 (SQLCipher 4.20.0, SQLite 3.54.1), which has the fix. rusqlite 0.43.0 is the release that takes libsqlite3-sys ^0.40. Its MSRV is 1.89, the same as the workspace. The SQLCipher C now comes from the sqlcipher-src crate, which declares "MIT AND BSD-3-Clause AND blessing AND WTFPL". deny.toml allows blessing and WTFPL for that one crate only. The code in the binary is the same kind as before; only its licence metadata is new. RUSTSEC-2026-0486: rustix 1.1.4 -> 1.1.6 (xattr unsound on a zero-length buffer). packaging/flatpak/cargo-sources.json is regenerated with scripts/flatpak/gen-cargo-sources.sh. Supersedes #372. Fixes #370. Co-Authored-By: Claude Opus 5.5 Signed-off-by: James Reilly --- Cargo.lock | 100 +++++++++++++++++---------- Cargo.toml | 4 +- deny.toml | 8 +++ packaging/flatpak/cargo-sources.json | 69 ++++++++++++++---- 4 files changed, 128 insertions(+), 53 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f23a3d2714..a05eb24c20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,7 +228,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -239,7 +239,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -364,7 +364,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.4", + "rustix 1.1.6", "slab", "windows-sys 0.61.2", ] @@ -395,7 +395,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 1.1.4", + "rustix 1.1.6", ] [[package]] @@ -421,7 +421,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.4", + "rustix 1.1.6", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -718,7 +718,7 @@ checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ "bitflags 2.13.2", "polling", - "rustix 1.1.4", + "rustix 1.1.6", "slab", "tracing", ] @@ -742,7 +742,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" dependencies = [ "calloop 0.14.4", - "rustix 1.1.4", + "rustix 1.1.6", "wayland-backend", "wayland-client", ] @@ -1082,7 +1082,7 @@ dependencies = [ "percent-encoding", "proptest", "roxmltree", - "rustix 1.1.4", + "rustix 1.1.6", "schemars", "serde", "serde_json", @@ -1920,7 +1920,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2056,7 +2056,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2440,7 +2440,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.4", + "rustix 1.1.6", "windows-link 0.2.1", ] @@ -3313,7 +3313,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3630,12 +3630,13 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.38.2" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8" +checksum = "b06e69070b7e12262b0cd90832f0a7396f142a2b330181255562decf9f0c6215" dependencies = [ "cc", "pkg-config", + "sqlcipher-src", "vcpkg", ] @@ -4082,7 +4083,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4709,7 +4710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4979,7 +4980,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.4", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -5477,11 +5478,20 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" +[[package]] +name = "rsqlite-vfs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353b74f9810d5b085b6c42c9d86a5f0fdb795553235cdd48753b32e3809d18a7" +dependencies = [ + "thiserror 2.0.20", +] + [[package]] name = "rusqlite" -version = "0.40.2" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3" +checksum = "f172c4812a19b26d1c23cdb0070e69db335503dfa378b910eb857386e5b8beba" dependencies = [ "bitflags 2.13.2", "fallible-iterator", @@ -5489,6 +5499,7 @@ dependencies = [ "hashlink", "libsqlite3-sys", "smallvec", + "sqlite-wasm-rs", ] [[package]] @@ -5527,15 +5538,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags 2.13.2", "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5975,7 +5986,7 @@ dependencies = [ "log", "memmap2", "pkg-config", - "rustix 1.1.4", + "rustix 1.1.6", "thiserror 2.0.20", "wayland-backend", "wayland-client", @@ -6025,7 +6036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -6047,7 +6058,7 @@ dependencies = [ "objc2-quartz-core 0.3.2", "raw-window-handle", "redox_syscall 0.5.18", - "rustix 1.1.4", + "rustix 1.1.6", "tiny-xlib", "tracing", "wasm-bindgen", @@ -6083,6 +6094,23 @@ dependencies = [ "bitflags 2.13.2", ] +[[package]] +name = "sqlcipher-src" +version = "420.0.0+sqlcipher-4.20.0-sqlite-3.54.1-libtomcrypt-1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6b5280ed2593d07b2816ec531821c15c306903bcca224716f1fbcc2bbfedfe" + +[[package]] +name = "sqlite-wasm-rs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cd504cecbfe7eef649988840f9a6cb768d11085efec138f8e99f160632d867" +dependencies = [ + "cc", + "rsqlite-vfs", + "sqlcipher-src", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -6247,8 +6275,8 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix 1.1.4", - "windows-sys 0.61.2", + "rustix 1.1.6", + "windows-sys 0.52.0", ] [[package]] @@ -6657,7 +6685,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -7002,7 +7030,7 @@ checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" dependencies = [ "cc", "downcast-rs", - "rustix 1.1.4", + "rustix 1.1.6", "scoped-tls", "smallvec", "wayland-sys", @@ -7015,7 +7043,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ "bitflags 2.13.2", - "rustix 1.1.4", + "rustix 1.1.6", "wayland-backend", "wayland-scanner", ] @@ -7037,7 +7065,7 @@ version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" dependencies = [ - "rustix 1.1.4", + "rustix 1.1.6", "wayland-client", "xcursor", ] @@ -7126,7 +7154,7 @@ checksum = "0dde9c29be0f723a573977de51ee455bf3dfa03652730a74f9dd3b337e374d75" dependencies = [ "bitflags 2.13.2", "downcast-rs", - "rustix 1.1.4", + "rustix 1.1.6", "wayland-backend", "wayland-scanner", ] @@ -7335,7 +7363,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -7893,7 +7921,7 @@ dependencies = [ "libc", "log", "os_pipe", - "rustix 1.1.4", + "rustix 1.1.6", "thiserror 2.0.20", "tree_magic_mini", "wayland-backend", @@ -7939,7 +7967,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 1.1.4", + "rustix 1.1.6", "x11rb-protocol", ] @@ -8060,7 +8088,7 @@ dependencies = [ "hex", "libc", "ordered-stream", - "rustix 1.1.4", + "rustix 1.1.6", "serde", "serde_repr", "tokio", diff --git a/Cargo.toml b/Cargo.toml index 2c34d83242..26ee076494 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,8 +97,8 @@ mime_guess = "2" # add a wasm backend and nothing else we use. Only compass-sqlcipher-sys names # this; callers use its re-export so the tokenizer registration cannot be # skipped by opening a connection some other way. -rusqlite = { version = "0.40.2", default-features = false, features = ["bundled-sqlcipher", "cache"] } -libsqlite3-sys = { version = "0.38.2", default-features = false } +rusqlite = { version = "0.43.0", default-features = false, features = ["bundled-sqlcipher", "cache"] } +libsqlite3-sys = { version = "0.40.0", default-features = false } # Clipboard-at-rest crypto. See crates/compass-crypto/src/lib.rs for why these # and not the `openssl` crate. diff --git a/deny.toml b/deny.toml index cdbd02f27e..6352d2e226 100644 --- a/deny.toml +++ b/deny.toml @@ -80,3 +80,11 @@ allow = [ "Zlib", ] confidence-threshold = 0.8 +# sqlcipher-src carries the SQLCipher amalgamation that libsqlite3-sys +# 0.40 builds for bundled-sqlcipher. Until 0.39 that C was inside +# libsqlite3-sys and its licence was not declared on its own. SQLite is +# public domain under its blessing, and the bundled libtomcrypt is WTFPL. +# Both are GPL-3.0 compatible. Scoped to this one crate, not to the graph. +exceptions = [ + { crate = "sqlcipher-src", allow = ["blessing", "WTFPL"] }, +] diff --git a/packaging/flatpak/cargo-sources.json b/packaging/flatpak/cargo-sources.json index 3a25ac36b3..5fd3d34286 100644 --- a/packaging/flatpak/cargo-sources.json +++ b/packaging/flatpak/cargo-sources.json @@ -4071,14 +4071,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/libsqlite3-sys/libsqlite3-sys-0.38.2.crate", - "sha256": "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8", - "dest": "cargo/vendor/libsqlite3-sys-0.38.2" + "url": "https://static.crates.io/crates/libsqlite3-sys/libsqlite3-sys-0.40.0.crate", + "sha256": "b06e69070b7e12262b0cd90832f0a7396f142a2b330181255562decf9f0c6215", + "dest": "cargo/vendor/libsqlite3-sys-0.40.0" }, { "type": "inline", - "contents": "{\"package\": \"f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8\", \"files\": {}}", - "dest": "cargo/vendor/libsqlite3-sys-0.38.2", + "contents": "{\"package\": \"b06e69070b7e12262b0cd90832f0a7396f142a2b330181255562decf9f0c6215\", \"files\": {}}", + "dest": "cargo/vendor/libsqlite3-sys-0.40.0", "dest-filename": ".cargo-checksum.json" }, { @@ -6437,14 +6437,27 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/rusqlite/rusqlite-0.40.2.crate", - "sha256": "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3", - "dest": "cargo/vendor/rusqlite-0.40.2" + "url": "https://static.crates.io/crates/rsqlite-vfs/rsqlite-vfs-0.2.0.crate", + "sha256": "353b74f9810d5b085b6c42c9d86a5f0fdb795553235cdd48753b32e3809d18a7", + "dest": "cargo/vendor/rsqlite-vfs-0.2.0" }, { "type": "inline", - "contents": "{\"package\": \"23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3\", \"files\": {}}", - "dest": "cargo/vendor/rusqlite-0.40.2", + "contents": "{\"package\": \"353b74f9810d5b085b6c42c9d86a5f0fdb795553235cdd48753b32e3809d18a7\", \"files\": {}}", + "dest": "cargo/vendor/rsqlite-vfs-0.2.0", + "dest-filename": ".cargo-checksum.json" + }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/rusqlite/rusqlite-0.43.0.crate", + "sha256": "f172c4812a19b26d1c23cdb0070e69db335503dfa378b910eb857386e5b8beba", + "dest": "cargo/vendor/rusqlite-0.43.0" + }, + { + "type": "inline", + "contents": "{\"package\": \"f172c4812a19b26d1c23cdb0070e69db335503dfa378b910eb857386e5b8beba\", \"files\": {}}", + "dest": "cargo/vendor/rusqlite-0.43.0", "dest-filename": ".cargo-checksum.json" }, { @@ -6502,14 +6515,14 @@ { "type": "archive", "archive-type": "tar-gzip", - "url": "https://static.crates.io/crates/rustix/rustix-1.1.4.crate", - "sha256": "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190", - "dest": "cargo/vendor/rustix-1.1.4" + "url": "https://static.crates.io/crates/rustix/rustix-1.1.6.crate", + "sha256": "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa", + "dest": "cargo/vendor/rustix-1.1.6" }, { "type": "inline", - "contents": "{\"package\": \"b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190\", \"files\": {}}", - "dest": "cargo/vendor/rustix-1.1.4", + "contents": "{\"package\": \"e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa\", \"files\": {}}", + "dest": "cargo/vendor/rustix-1.1.6", "dest-filename": ".cargo-checksum.json" }, { @@ -7175,6 +7188,32 @@ "dest": "cargo/vendor/spirv-0.3.0+sdk-1.3.268.0", "dest-filename": ".cargo-checksum.json" }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/sqlcipher-src/sqlcipher-src-420.0.0+sqlcipher-4.20.0-sqlite-3.54.1-libtomcrypt-1.18.2.crate", + "sha256": "fd6b5280ed2593d07b2816ec531821c15c306903bcca224716f1fbcc2bbfedfe", + "dest": "cargo/vendor/sqlcipher-src-420.0.0+sqlcipher-4.20.0-sqlite-3.54.1-libtomcrypt-1.18.2" + }, + { + "type": "inline", + "contents": "{\"package\": \"fd6b5280ed2593d07b2816ec531821c15c306903bcca224716f1fbcc2bbfedfe\", \"files\": {}}", + "dest": "cargo/vendor/sqlcipher-src-420.0.0+sqlcipher-4.20.0-sqlite-3.54.1-libtomcrypt-1.18.2", + "dest-filename": ".cargo-checksum.json" + }, + { + "type": "archive", + "archive-type": "tar-gzip", + "url": "https://static.crates.io/crates/sqlite-wasm-rs/sqlite-wasm-rs-0.6.3.crate", + "sha256": "a6cd504cecbfe7eef649988840f9a6cb768d11085efec138f8e99f160632d867", + "dest": "cargo/vendor/sqlite-wasm-rs-0.6.3" + }, + { + "type": "inline", + "contents": "{\"package\": \"a6cd504cecbfe7eef649988840f9a6cb768d11085efec138f8e99f160632d867\", \"files\": {}}", + "dest": "cargo/vendor/sqlite-wasm-rs-0.6.3", + "dest-filename": ".cargo-checksum.json" + }, { "type": "archive", "archive-type": "tar-gzip",