From 4d46032f5471f495a475e110af7e9e653d776aac Mon Sep 17 00:00:00 2001 From: Jeongkyu Shin Date: Fri, 20 Nov 2026 03:56:04 +0900 Subject: [PATCH] update: bump russh and ssh-key to clear RUSTSEC-2023-0071 russh 0.65.1 pinned rsa =0.10.0-rc.18, and prerelease versions sort below the patched rsa 0.10.0, so cargo audit and cargo deny kept reporting the Marvin timing advisory. russh 0.65.2 depends on rsa ^0.10 and ssh-key =0.7.0-rc.12, which resolves rsa 0.10.0 and pkcs1 0.8.0 stable. Bump russh to 0.65.2 and the ssh-key pin to =0.7.0-rc.12 to match it, and drop the now-unneeded RUSTSEC-2023-0071 suppression from .cargo/audit.toml. russh-sftp 3.0.1 only uses russh as a dev-dependency and needs no change. Validated with clippy -D warnings and cargo test --all-features (2739 pass, including the 66 certificate tests). The 4 integration_test failures come from the local SSH agent having no identities and fail the same way on main. cargo deny check advisories no longer reports RUSTSEC-2023-0071. Closes #361 --- .cargo/audit.toml | 17 +---------------- Cargo.lock | 23 +++++++++++++---------- Cargo.toml | 6 +++--- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 1136defdd..b2719ef9a 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -3,19 +3,4 @@ # https://docs.rs/cargo-audit/latest/cargo_audit/ [advisories] -ignore = [ - # RUSTSEC-2023-0071: Marvin Attack — potential RSA key recovery via timing sidechannel. - # - # No fixed upgrade is available for any version of the `rsa` crate. The vulnerability - # is inherent to the current RustCrypto RSA implementation, which lacks constant-time - # primitives. Both `rsa 0.9.x` (via ssh-key 0.6.x) and `rsa 0.10.0-rc.x` (via - # russh's ssh-key) are affected. - # - # Mitigation: users should prefer Ed25519 or ECDSA host/user keys over RSA where - # possible. The Marvin Attack requires precise timing measurements over many - # observed decryptions; SSH session establishment is a high-noise channel that - # makes practical exploitation against bssh extremely difficult. - # - # Tracking: https://github.com/RustCrypto/RSA/issues/19 - "RUSTSEC-2023-0071", -] +ignore = [] diff --git a/Cargo.lock b/Cargo.lock index a89429bf9..daaf47fe9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -940,9 +940,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c035cb64cba03dad2fb921f3e218785e8cf9a41790da5eb3a1400f62fa2be11" +checksum = "914c195c4d7fbc5ed7f88d14cbf85914d5c664967658d43404b263913a477e82" dependencies = [ "cpubits", "ctutils", @@ -1195,6 +1195,7 @@ dependencies = [ "const-oid", "crypto-common 0.2.2", "ctutils", + "zeroize", ] [[package]] @@ -3258,9 +3259,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkcs1" -version = "0.8.0-rc.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +checksum = "6250dd7321adbe93d12b750aee0ced159fd13e77f625edcdf1cb6f83cd99f650" dependencies = [ "der", "spki", @@ -3874,14 +3875,16 @@ dependencies = [ [[package]] name = "rsa" -version = "0.10.0-rc.18" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b2aa4ba0d89f73d1e332df05be0eeab8840351c36ca5654341dfdb57bb3caf" +checksum = "23e77fd77e0dea28b3011fd62d15445b7de7959333b0276d930e03be0f755699" dependencies = [ "const-oid", "crypto-bigint", + "crypto-common 0.2.2", "crypto-primes", "digest 0.11.3", + "hmac", "pkcs1", "pkcs8", "rand_core 0.10.1", @@ -3903,9 +3906,9 @@ dependencies = [ [[package]] name = "russh" -version = "0.65.1" +version = "0.65.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94be3d86c71b9ed220a675c405e35c7a02565a009bf8da2e9cc13a700320a5c5" +checksum = "78229f06e4d96d83bea5f5133ad3b6e4b5f0ce22d8e31c1ff7243ec8e18d5ba1" dependencies = [ "aes", "aws-lc-rs", @@ -4568,9 +4571,9 @@ dependencies = [ [[package]] name = "ssh-key" -version = "0.7.0-rc.11" +version = "0.7.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a32fae177b74a22aa9c5b01bf7e68b33545be32d9e381e248058d2adc15ce3" +checksum = "0701b552e6bd8f13a6e07bde25307c32d7daad80a79b65832d110c0416e7b638" dependencies = [ "argon2", "bcrypt-pbkdf", diff --git a/Cargo.toml b/Cargo.toml index d748aebdc..70ccb647e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ tokio = { version = "1.54.1", features = ["full"] } # empty, so it never negotiates one; the handler in # src/ssh/tokio_client/connection.rs refuses certificates because bssh # verifies no CA signatures. -russh = "0.65.1" +russh = "0.65.2" # Upstream russh-sftp. bssh's pipelined client transfers live in # src/ssh/tokio_client/sftp_client.rs and its read-ahead / write-coalescing # server loop in src/server/sftp_loop.rs, both on russh-sftp's public API. @@ -93,9 +93,9 @@ ipnetwork = "0.21" bcrypt = "0.19" argon2 = "0.6" rand = "0.10" -# Pinned to match russh's ssh-key (0.65.x uses =0.7.0-rc.11) so the workspace +# Pinned to match russh's ssh-key (0.65.2 uses =0.7.0-rc.12) so the workspace # resolves a single ssh-key version instead of 0.6 + 0.7-rc side by side. -ssh-key = { version = "=0.7.0-rc.11", features = ["std"] } +ssh-key = { version = "=0.7.0-rc.12", features = ["std"] } async-compression = { version = "0.4", features = ["tokio", "gzip"] } serde_json = "1.0" opentelemetry = "0.33"