Advisory

RUSTSEC-2024-0450

Also known as: CVE-2024-43410, GHSA-vgvv-x7xg-6cqg

Summary

Memory exhaustion from an unchecked SSH packet length

Details

When reading a packet, russh took the 4-byte packet length sent by the peer and sized its receive buffer from it without any upper bound. The length is fully controlled by the other side of the connection and is read before authentication, so an unauthenticated client can claim packets of up to about 4 GiB and make a server allocate that much memory per connection. A few such connections are enough to run the process out of memory.

From 0.44.1, lengths above 256 KiB are rejected with Error::PacketSize before the buffer is sized.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2024-08-14 12:00 UTC
Modified
2026-11-12 08:00 UTC

Affected packages and fixes

russh

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.44.1 (semver)

Fixed versions

0.44.1

Fix

  • Fixed version 0.44.1
    cargo update -p russh --precise 0.44.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences