Releases: Eugeny/russh
v0.46.0
Changes
- wasm-support: add wasm support (#351) #351 (irvingouj @ Devolutions)
- 97dc08b: Support Pageant as agent (#326) #326
- 26aae26: added named pipe support for
AgentClient
andAgentClient::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
andserver_channel_open_session
now receive aChannel
instead of aChannelId
. Also addedshould_accept_unknown_server_channel
andserver_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
- process multiple host entries (#331) #331 (Yaroslav Bolyukin)
- b704f4c: Remove leftover extraneous debugging in host globbing function (#328) (Adam Chappell) #328
- c99f49c: fixed
Error::Disconnect
getting returned fromconnect
instead of the more specific error type when connection fails during kex phase - 73fa3e5: Improve echoserver example, bump Rust toolchain to 1.81 (#339) (Julian) #339
- fix typo: add a missing word. (#342) #342 (Pipelight)
- f587d13: Reject unsupported key types instead of failing (#352) (Gary Guo) #352
- 6df962d: Minor accuracy improvements to server documentation (#346) (Kaleb Elwert) #346
- add adopters to readme (#356) #356 (Thomas Rampelberg)
- cd84f4d: Update sftp examples (#357) (Roman) #357
v0.45.0
v0.44.1
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
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 theopenssl
feature is disabled.
Preferred algorithms config changes - 77cc2f7
- The fields specifying cipher algorithms in
Preferred
are nowCow<&'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 nowrussh::compression::Name
instead ofString
. - All
Name
structs now implementTryFrom<&'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
andrussh::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 inv0.44
but by default,v0.44
will fail to parse keys generated inv0.43
. - To allow
v0.44
to parse these keys, enable thelegacy-ed25519-pkcs8-parser
feature of therussh-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
intou32
Fixes
- 643be05: Fix block ciphers + HMAC_SHA1_ETM (#298) (Pierre Barre) #298
- 2bfe426: Fix hardcoded public key auth negotiation (#294) (Tom König) #294
- 9cce48c: Allow ssh-rsa keys to be used for rsa-sha2-* auth (#290) (Ana Gelez) #290
- Fix a segmentation fault (#288) #288 (Ana Gelez)
- 9e1ed09: Overachiever host key checking (#302) (Jean-Baptiste Skutnik) #302
- 3f4646a: removed use of unstable Option::inspect
- f2d94c0: fixed warp-tech/warpgate#996 - prevent offering of unparseable public keys from ending the session
v0.44.0-beta.4
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 inv0.44
but by default,v0.44
will fail to parse keys generated inv0.43
. - To allow
v0.44
to parse these keys, enable thelegacy-ed25519-pkcs8-parser
feature of therussh-keys
crate.
v0.44.0-beta.3
Preferred algorithms config changes
-
77cc2f7: algorithm names QoL changes
-
The fields specifying cipher algorithms in
Preferred
are nowCow<&'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 nowrussh::compression::Name
instead ofString
. - All
Name
structs now implementTryFrom<&'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
andrussh::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
intou32
Fixes
- 643be05: Fix block ciphers + HMAC_SHA1_ETM (#298) (Pierre Barre) #298
- 2bfe426: Fix hardcoded public key auth negotiation (#294) (Tom König) #294
- 9cce48c: Allow ssh-rsa keys to be used for rsa-sha2-* auth (#290) (Ana Gelez) #290
- Fix a segmentation fault (#288) #288 (Ana Gelez)
- 9e1ed09: Overachiever host key checking (#302) (Jean-Baptiste Skutnik) #302
- 3f4646a: removed use of unstable Option::inspect
v0.44.0-beta.1
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
v0.43.0
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
v0.43.0-beta.1
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
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