Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTU2NngtaGhyZi1xZjht
ordered_float:NotNan may contain NaN after panic in assignment operators
After using an assignment operators such as NotNan::add_assign, NotNan::mul_assign, etc., it was possible for the resulting NotNan value to contain a NaN. This could cause undefined behavior in safe code, because the safe NotNan::cmp method contains internal unsafe code that assumes the value is never NaN. (It could also cause undefined behavior in third-party unsafe code that makes the same assumption, as well as logic errors in safe code.)
This was mitigated starting in version 0.4.0, by panicking if the assigned value is NaN. However, in affected versions from 0.4.0 onward, code that uses the NotNan value during unwinding, or that continues after catching the panic, could still observe the invalid value and trigger undefined behavior.
The flaw is fully corrected in versions 1.1.1 and 2.0.1, by ensuring that the assignment operators panic without modifying the operand, if the result would be NaN.
Permalink: https://github.com/advisories/GHSA-566x-hhrf-qf8mJSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTU2NngtaGhyZi1xZjht
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 3 years ago
Updated: over 1 year ago
CVSS Score: 5.5
CVSS vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Identifiers: GHSA-566x-hhrf-qf8m, CVE-2020-35923
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-35923
- https://github.com/reem/rust-ordered-float/pull/71
- https://rustsec.org/advisories/RUSTSEC-2020-0082.html
- https://github.com/reem/rust-ordered-float/commit/c55cda301c943270b7eb2b4765bedbcce56edb90
- https://github.com/reem/rust-ordered-float/commit/da4a8dd49300740a434c095a9c4b408d2415cc08
- https://github.com/advisories/GHSA-566x-hhrf-qf8m
Blast Radius: 21.9
Affected Packages
cargo:ordered-float
Dependent packages: 558Dependent repositories: 9,439
Downloads: 95,067,669 total
Affected Version Ranges: >= 0.2.2, < 1.1.1, = 2.0.0
Fixed in: 1.1.1, 2.0.1
All affected versions: 0.2.2, 0.2.3, 0.3.0, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 2.0.0
All unaffected versions: 0.0.1, 0.0.2, 0.1.0, 0.2.0, 0.2.1, 1.1.1, 2.0.1, 2.1.0, 2.1.1, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0, 2.10.1, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.9.1, 3.9.2, 4.0.0, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.2, 4.3.0, 4.4.0, 4.5.0