Skip to content
OpenAdvisories
High · 7.5 CVE-2024-43410 EUVD-2024-2664GHSA-vgvv-x7xg-6cqgRUSTSEC-2024-0450

Russh has an OOM Denial of Service due to allocation of untrusted amount

Published Aug 21, 2024 · Updated Aug 21, 2024 · Assigned by GitHub_M

Description

Russh is a Rust SSH client & server library. Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server. An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length.
After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later. But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests. This vulnerability is fixed in 0.44.1.

Affected products

VendorProductAffectedFixed
Eugeny russh < 0.44.1 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io russh < 0.44.1 0.44.1 GHSA-vgvv-x7xg-6cqg

References