Rust-WebSocket is a WebSocket (RFC6455) library written in Rust. In versions prior to 0.26.5 untrusted websocket connections can cause an out-of-memory (OOM) process abort in a client or a server. The root cause of the issue is during dataframe parsing. Affected versions would allocate a buffer based on the declared dataframe size, which may come from an untrusted source. When `Vec::with_capacity` fails to allocate, the default Rust allocator will abort the current process, killing all threads. This affects only sync (non-Tokio) implementation. Async version also does not limit memory, but does not use `with_capacity`, so DoS can happen only when bytes for oversized dataframe or message actually got delivered by the attacker. The crashes are fixed in version 0.26.5 by imposing default dataframe size limits. Affected users are advised to update to this version. Users unable to upgrade are advised to filter websocket traffic externally or to only accept trusted traffic.
History

No history.

cve-icon MITRE Information

Status: PUBLISHED

Assigner: GitHub_M

Published: 2022-08-01T21:35:11

Updated: 2022-08-15T02:06:56

Reserved: 2022-07-15T00:00:00


Link: CVE-2022-35922

JSON object: View

cve-icon NVD Information

Status : Modified

Published: 2022-08-01T22:15:10.460

Modified: 2023-11-07T03:49:26.813


Link: CVE-2022-35922

JSON object: View

cve-icon Redhat Information

No data.