CVE-2020-35921
JSON

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 packageVersionsReported by
Unspecified productn/aCVE 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.6GitHub Advisory Database, RustSec Advisory Database
miow_project miowbefore 0.2.2, from 0.3.0 before 0.3.6NVD

All scores

GitHub5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
RustSec Advisory Database5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD2.1low CVSS:2.0AV: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

Sources

SourceRecordLicence
CVE ListCVE-2020-35921 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-jrcf-4jp8-m28v changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2020-0080 changed 2023-11-08CC0-1.0
NVDCVE-2020-35921 changed 2026-06-17Public domain