Skip to content

Releases: Eugeny/russh

v0.46.0

03 Nov 19:52
Compare
Choose a tag to compare

Changes

  • wasm-support: add wasm support (#351) #351 (irvingouj @ Devolutions)
  • 97dc08b: Support Pageant as agent (#326) #326
  • 26aae26: added named pipe support for AgentClient and AgentClient::dynamic()
  • 8b88465: added AgentClient::into_inner
  • 67a6ba8: Implement streamlocal-forward for remote => local UDS forwarding (#312) (kanpov) #312
  • b9759d4: client channel handling changes - server_channel_open_direct_tcpip, server_channel_open_agent_forward and server_channel_open_session now receive a Channel instead of a ChannelId. Also added should_accept_unknown_server_channel and server_channel_open_unknown callbacks.
  • d6ee97a: new rich NoCommonAlgo error
  • cb8d9e9: fixed #338 - make KeyPair::generate_ed25519 infallible
  • 9444608: Add a way to open an agent forwarding channel (#344) (Thomas Rampelberg) #344
  • ee59e07: Add ed25519 to ALL_KEY_TYPES (#360) (Toni Peter) #360
  • 3f7271b: fixed #358 - relax strict kex checks to match OpenSSH
  • 72aa097: Update deps (#363) (Lucas Kent) #363

Fixes

v0.45.0

14 Aug 22:07
Compare
Choose a tag to compare

Changes

  • 4eaa080: added support for the 3des-cbc cipher. As an outdated cipher, it's not included in the defaults list and has to be explicitly enabled.

Improvements

v0.44.1

14 Aug 21:10
Compare
Choose a tag to compare

Security fixes

CVE-2024-43410 - SSH OOM DoS through malicious packet length

It was possible for an attacker to cause Warpgate to allocate an arbitrary amount of memory by sending a packet with a malformed length field, potentially causing the application to get killed due to excessive RAM usage.

v0.44.0

18 Jul 07:39
Compare
Choose a tag to compare

Breaking changes

OpenSSL-free RSA

  • This release adds a default pure-Rust RSA implementation, meaning that you can disable the openssl feature to reduce your app size and improve portability and build speed.
  • RSA is now enabled by default in Preferred::DEFAULT when the openssl feature is disabled.

Preferred algorithms config changes - 77cc2f7

  • The fields specifying cipher algorithms in Preferred are now Cow<&'static, [Name]> instead of &'static [Name], allowing you to dynamically construct the lists. If you're using custom algorithm lists, you'll need to update your code:
  config.preferred = Preferred {
-   kex: &[CURVE25519],
+   kex: Cow::Borrowed(&[CURVE25519]),
    ..<_>::default()
  }
  • The type of Preferred::compression items is now russh::compression::Name instead of String.
  • All Name structs now implement TryFrom<&'static str> which will validate that the named algorithm is actually implemented in the library.
  • There are now companion algorithm lists to choose from dynamically: russh_keys::key::ALL_KEY_TYPES, russh::kex::ALL_KEX_ALGORITHMS, russh::cipher::ALL_CIPHERS, russh::compression::ALL_COMPRESSION_ALGORITHMS and russh::mac::ALL_MAC_ALGORITHMS.

Incorrect Ed25519 PKCS#8 key saving

  • Up to v0.43, russh-keys has generated incorrect key format when saving Ed25519 keys in PKCS#8 format. This is fixed in v0.44 but by default, v0.44 will fail to parse keys generated in v0.43.
  • To allow v0.44 to parse these keys, enable the legacy-ed25519-pkcs8-parser feature of the russh-keys crate.

Other changes

  • 3bfd99f: ecdh-sha2-nistp{256,384,521} kex support (#282) (Michael Gleason) #282
  • 800969b: Implement -cbc ciphers. (#297) (Pierre Barre) #297
  • 1eaadfb: Add support for glob pattern matching in Host directives (#306) (Adam Chappell) #306
  • 88196a7: allow converting ChannelId into u32

Fixes

v0.44.0-beta.4

16 Jul 19:08
Compare
Choose a tag to compare
v0.44.0-beta.4 Pre-release
Pre-release

Changes

Incorrect Ed25519 PKCS#8 key saving

  • Up to v0.43, russh-keys has generated incorrect key format when saving Ed25519 keys in PKCS#8 format. This is fixed in v0.44 but by default, v0.44 will fail to parse keys generated in v0.43.
  • To allow v0.44 to parse these keys, enable the legacy-ed25519-pkcs8-parser feature of the russh-keys crate.

v0.44.0-beta.3

09 Jul 20:25
Compare
Choose a tag to compare
v0.44.0-beta.3 Pre-release
Pre-release

Preferred algorithms config changes

  • 77cc2f7: algorithm names QoL changes

  • The fields specifying cipher algorithms in Preferred are now Cow<&'static, [Name]> instead of &'static [Name], allowing you to dynamically construct the lists. If you're using custom algorithm lists, you'll need to update your code:

  config.preferred = Preferred {
-   kex: &[CURVE25519],
+   kex: Cow::Borrowed(&[CURVE25519]),
    ..<_>::default()   
  }
  • The type of Preferred::compression items is now russh::compression::Name instead of String.
  • All Name structs now implement TryFrom<&'static str> which will validate that the named algorithm is actually implemented in the library.
  • There are now companion algorithm lists to choose from dynamically: russh_keys::key::ALL_KEY_TYPES, russh::kex::ALL_KEX_ALGORITHMS, russh::cipher::ALL_CIPHERS, russh::compression::ALL_COMPRESSION_ALGORITHMS and russh::mac::ALL_MAC_ALGORITHMS.

Changes

  • 3bfd99f: ecdh-sha2-nistp{256,384,521} kex support (#282) (Michael Gleason) #282
  • 800969b: Implement -cbc ciphers. (#297) (Pierre Barre) #297
  • 1eaadfb: Add support for glob pattern matching in Host directives (#306) (Adam Chappell) #306
  • 88196a7: allow converting ChannelId into u32

Fixes

v0.44.0-beta.1

04 May 19:40
Compare
Choose a tag to compare
v0.44.0-beta.1 Pre-release
Pre-release

Notes

  • This release adds a default pure-Rust RSA implementation, meaning that you can disable the openssl feature to reduce your app size and improve portability and build speed.

Changes

  • c850dbd: Add pure-rust RSA implementation (#273) (Robert Wang) #273
  • 3041b0c: Implement ecdsa-sha2-nistp{256,384,521} (#267) (Robert Wang) #267
  • b20504d: Implements client support for OpenSSH Certificates (#278) (Shoaib Merchant) #278
  • 4f749f4: Replace custom PKCS #8 parsing with der crate and others (#274) (Robert Wang) #274
  • 194430b: Use ssh-key crate to decode OpenSSH public/private keys (#279) (Robert Wang) #279
  • 4b40f51: Zeroize RSA private key data on drop (#275) (Robert Wang) #275

Fixes

  • 58d9274: Fix compilation error when using without the flate2 feature (#263) (citorva) #263
  • 0915744: fixed #270 - decode_pkcs5 does not remove padding
  • e745827: Updated curve25519-dalek to 4.1.2 (#269) (Chander) #269
  • 8d582f6: Fix ed25519 key format in pkcs8 (#272) (Robert Wang) #272

v0.43.0

21 Mar 09:47
Compare
Choose a tag to compare

Breaking changes

Changes in the Handler traits

859e685: refactor Handler trait to use mutable reference instead of owned variables (Alessandro Ricottone) #247

The Handler traits no longer take ownership of both self and Session or have to return them. These have been replaced with normal &mut references.

You will need to update your Handler impls to match the new method signatures, for example:

     async fn channel_open_session(
-        self,
+        &mut self,
         channel: Channel<Msg>,
-        session: Session,
+        session: &mut Session,
-    ) -> Result<(Self, bool, Session), Self::Error> {
+    ) -> Result<bool, Self::Error> {
         ...
-        Ok((self, true, session))
+        Ok(true)
     }
 
     async fn auth_publickey(
-        self,
+        &mut self,
         _: &str,
         _: &key::PublicKey,
-    ) -> Result<(Self, server::Auth), Self::Error> {
+    ) -> Result<server::Auth, Self::Error> {
         ...
-        Ok((self, server::Auth::Accept))
+        Ok(server::Auth::Accept)
     }

russh::server::run moved into the Server trait

a592366: Move run and run_on_socket to Server trait (Alessandro Ricottone) #247

You'll need to replace the call to run with a call to Server::run_on_address, for example:

-    russh::server::run(config, ("0.0.0.0", 2222), &mut server).await?;
+    server.run_on_address(config, ("0.0.0.0", 2222)).await?;
 }
 

Changes

  • 1d7dab8: Better disconnect event handling (Adrian Müller) #255 - added Handler::disconnected
  • 45edb29: added specific error types for keepalive and inactivity timeouts
  • 0fcb1ec: Allow retrieving peer SSH Protocol Version String (#260) (Adrian Müller (DTT)) #260
  • 5c60d30: Actually process global request results (Adrian Müller) #250
  • dcbe4ba: update examples to new APIs (Alessandro Ricottone) #249

Fixes

  • 62366e9: #259, #245, ref #227 - fixed host key algo selection when Preferred::key and the available host keys don't match (#262) #262

v0.43.0-beta.1

10 Feb 13:18
Compare
Choose a tag to compare
v0.43.0-beta.1 Pre-release
Pre-release

Breaking changes

Changes in the Handler traits

859e685: refactor Handler trait to use mutable reference instead of owned variables (Alessandro Ricottone) #247

The Handler traits no longer take ownership of both self and Session or have to return them. These have been replaced with normal &mut references.

You will need to update your Handler impls to match the new method signatures, for example:

     async fn channel_open_session(
-        self,
+        &mut self,
         channel: Channel<Msg>,
-        session: Session,
+        session: &mut Session,
-    ) -> Result<(Self, bool, Session), Self::Error> {
+    ) -> Result<bool, Self::Error> {
         ...
-        Ok((self, true, session))
+        Ok(true)
     }
 
     async fn auth_publickey(
-        self,
+        &mut self,
         _: &str,
         _: &key::PublicKey,
-    ) -> Result<(Self, server::Auth), Self::Error> {
+    ) -> Result<server::Auth, Self::Error> {
         ...
-        Ok((self, server::Auth::Accept))
+        Ok(server::Auth::Accept)
     }

russh::server::run moved into the Server trait

a592366: Move run and run_on_socket to Server trait (Alessandro Ricottone) #247

You'll need to replace the call to run with a call to Server::run_on_address, for example:

-    russh::server::run(config, ("0.0.0.0", 2222), &mut server).await?;
+    server.run_on_address(config, ("0.0.0.0", 2222)).await?;
 }
 

v0.42.0

10 Feb 11:51
Compare
Choose a tag to compare

Changes

  • 2ce82f2: Support for NIST P-521 public keys (akeamc) #230
  • 8f6af5e: Support for diffie-hellman-group16-sha512 hex (Brendon Ho) #233
  • 273fd88: Add russh::server::run_on_socket to facilitate dropping privileges immediately after socket binding (Samuel Ainsworth) #231
  • be6f5be: implement Ord, PartialOrd for ChannelId (Sherlock Holo) #238

Fixes

  • b9dce87: Improve keepalive and inactivity timers (Milo Mirate) #214
  • 1541fe5: Analogous keepalive fixes to the client module (Samuel Ainsworth) #243
  • bd13e95: Avert the race between sending data and sending EOF (Milo Mirate) #222
  • 44a2392: server/encrypted.rs: respect proceed_with_methods in "none" and "password" authentication methods (Samuel Ainsworth) #241
  • 42c98a6: fixed #227 - only advertise host key algos for host keys present in server::Config