fix(ssh): update russh to 0.65 (RUSTSEC-2026-0495) (#2935)

The advisory covers russh's SSH agent server, which signed with confirm-constrained keys without asking; OpenIDEA only uses the agent client, so it was not affected, but cargo deny fails on main. 0.65 passes the verified key to the server's auth_publickey; the test SSH server follows.
This commit is contained in:
l0ng-ai
2026-11-12 18:05:33 +08:00
committed by GitHub
parent 7c51662e9e
commit 0324a81ce4
3 changed files with 6 additions and 6 deletions
Generated
+2 -3
View File
@@ -2637,7 +2637,6 @@ version = "1.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "337d46834ee672ab3e48caca2cb0c78cc174fb12b3a68d0d88f99a0519a5e36e"
dependencies = [
"generic-array 0.14.7",
"rustversion",
"typenum",
]
@@ -7712,9 +7711,9 @@ dependencies = [
[[package]]
name = "russh"
version = "0.64.1"
version = "0.65.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba61e87b9ec9a39a59a6bbed4c0b8ff7fb07073405b24a767a1f2c8560ac8f58"
checksum = "94be3d86c71b9ed220a675c405e35c7a02565a009bf8da2e9cc13a700320a5c5"
dependencies = [
"aes",
"bitflags 2.13.2",
+1 -1
View File
@@ -18,7 +18,7 @@ dirs.workspace = true
uuid.workspace = true
keyring.workspace = true
keyring-core.workspace = true
russh = { version = "0.64", default-features = false, features = ["ring", "rsa", "flate2"] }
russh = { version = "0.65", default-features = false, features = ["ring", "rsa", "flate2"] }
russh-sftp = "2.4"
flate2 = "1"
suppaftp = { version = "12.2.1", default-features = false, features = ["tokio-rustls-ring"] }
+3 -2
View File
@@ -44,8 +44,9 @@ impl server::Handler for Sshd {
Ok(if user == "dev" && password == "secret" { Auth::Accept } else { Auth::reject() })
}
async fn auth_publickey(&mut self, user: &str, key: &PublicKey) -> Result<Auth, Self::Error> {
Ok(if user == "dev" && key.key_data() == self.client_key.key_data() { Auth::Accept } else { Auth::reject() })
async fn auth_publickey(&mut self, user: &str, key: server::VerifiedPublicKey<'_>) -> Result<Auth, Self::Error> {
let accept = user == "dev" && key.public_key.key_data() == self.client_key.key_data();
Ok(if accept { Auth::Accept } else { Auth::reject() })
}
async fn channel_open_session(