5.5medium
miow invalidly assumes the memory layout of std::net::SocketAddr
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.40% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-jrcf-4jp8-m28vRUSTSEC-2020-0080
Description
An issue was discovered in the miow crate before 0.3.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| miow (crates.io) | from 0.3.0 before 0.3.6, from 0.0.0-0 before 0.2.2, from 0.3.0-0 before 0.3.6 | GitHub Advisory Database, RustSec Advisory Database |
| miow_project miow | before 0.2.2, from 0.3.0 before 0.3.6 | NVD |
All scores
| GitHub | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| RustSec Advisory Database | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.1low CVSS:2.0 | AV:L/AC:L/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
An issue was discovered in the miow crate before 0.3.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
GitHub Advisory Database
The miow 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.
RustSec Advisory Database
The miow 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.
NVD (es)
Se detectó un problema en la crate miow versiones anteriores a 0.3.6 para Rust. Presenta falsas expectativas sobre la representación de la memoria de la función std::net::SocketAddr.
References
| https://rustsec.org/advisories/RUSTSEC-2020-0080.html | advisory, exploit, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2020-35921 | advisory | |
| https://github.com/yoshuawuyts/miow/issues/38 | report, web | |
| https://github.com/yoshuawuyts/miow/pull/39 | web | |
| https://github.com/yoshuawuyts/miow/pull/40 | web | |
| https://github.com/yoshuawuyts/miow | package | |
| https://crates.io/crates/miow | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-35921 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jrcf-4jp8-m28v changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2020-0080 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2020-35921 changed 2026-06-17 | Public domain |