Skip to content

transport/frame: unbounded mem alloc based on unsanitized network input

Moderate
martinthomson published GHSA-5m9j-vr32-g7j5 Jan 31, 2024

Package

cargo neqo-transport (Rust)

Affected versions

<=0.6.8

Patched versions

0.6.9

Description

Summary

A malicious remote server can send a tampered QUIC ACK frame, causing a Firefox instance to attempt a memory allocation of a size chosen by the server. This can lead to crashes either from genuine memory exhaustion or from failed allocation attempts.

Details

When decoding a QUIC ACK frame, Neqo will first read the ACK range count (nr) and then allocate a Vec with a capacity of the count (arr). It does not enforce an upper bound on the count (nr). Thus an attacker can choose an arbitrarily large ACK range count (nr) and thus cause Neqo to attempt an effectively infinite memory allocation.

FRAME_TYPE_ACK | FRAME_TYPE_ACK_ECN => {
let la = dv(dec)?;
let ad = dv(dec)?;
let nr = dv(dec)?;
let fa = dv(dec)?;
let mut arr: Vec<AckRange> = Vec::with_capacity(nr as usize);

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

CVE ID

No known CVE

Weaknesses

No CWEs

Credits