Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1jNzljLWd3cGgtZ3Fmbc4AAnEA
`net2` invalidly assumes the memory layout of std::net::SocketAddr
The net2 crate has assumed std::net::SocketAddrV4 and std::net::SocketAddrV6 have the same memory layout as the system C representation sockaddr. It has simply casted the pointers to convert the socket addresses to the system representation. The standard library does not say anything about the memory layout, and this will cause invalid memory access if the standard library changes the implementation. No warnings or errors will be emitted once the change happens.
Permalink: https://github.com/advisories/GHSA-c79c-gwph-gqfmJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1jNzljLWd3cGgtZ3Fmbc4AAnEA
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: almost 2 years ago
Updated: 11 months 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-c79c-gwph-gqfm, CVE-2020-35919
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-35919
- https://rustsec.org/advisories/RUSTSEC-2020-0078.html
- https://github.com/deprecrated/net2-rs/issues/105
- https://github.com/advisories/GHSA-c79c-gwph-gqfm
Blast Radius: 23.8
Affected Packages
cargo:net2
Dependent packages: 193Dependent repositories: 21,427
Downloads: 41,313,644 total
Affected Version Ranges: < 0.2.36
Fixed in: 0.2.36
All affected versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.2.17, 0.2.18, 0.2.19, 0.2.20, 0.2.21, 0.2.22, 0.2.23, 0.2.24, 0.2.25, 0.2.26, 0.2.27, 0.2.28, 0.2.29, 0.2.30, 0.2.31, 0.2.32, 0.2.33, 0.2.34, 0.2.35
All unaffected versions: 0.2.36, 0.2.37, 0.2.38, 0.2.39