Rust advisories / miow
Unsound MediumRUSTSEC-2020-0080 · miow
RUSTSEC-2020-0080: `miow` invalidly assumes the memory layout of std::net::SocketAddr
Short answermiow has an API that can cause undefined behaviour from safe code: `miow` invalidly assumes the memory layout of std::net::SocketAddr. Fixed in 0.2.2, 0.3.6.
| Crate | miow |
|---|---|
| Type | Unsound |
| Affected versions | Before 0.2.2; from 0.3.0 before 0.3.6. |
| Fixed in | 0.2.2, 0.3.6 |
| Severity | Medium, CVSS 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| Published | 2020-11-13 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2020-35921, GHSA-jrcf-4jp8-m28v |
What to do
- See which version you have:
cargo tree -i miow(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p miow. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplemiow = "0.3.6") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
References
- Package: crates.io/crates/miow
- Advisory: rustsec.org/advisories/RUSTSEC-2020-0080.html
- Report: github.com/yoshuawuyts/miow/issues/38
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?