Every CVE Search/ Get API key

CVE-2020-35922

mio invalidly assumes the memory layout of std::net::SocketAddr

5.5 MediumFix available

An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.39%Unchanged since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 5.5

An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

Record
CVE-2020-35922
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
2.1 LowAV:L/AC:L/Au:N/C:N/I:N/A:P
Updated
2026-11-02
CVE List No score

An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

Record
CVE-2020-35922
Updated
2026-11-02
EUVDEUVD-2021-1816 No score

An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

Record
EUVD-2021-1816
Updated
2026-11-03
GitHub AdvisoriesGHSA-pf3p-x6qj-6j7q 5.5

mio invalidly assumes the memory layout of std::net::SocketAddr

The mio 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.

Record
GHSA-pf3p-x6qj-6j7q
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-188
Updated
2026-11-02
OSV 5.5

An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

Record
CVE-2020-35922
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-pf3p-x6qj-6j7q 5.5

mio invalidly assumes the memory layout of std::net::SocketAddr

The mio 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.

Record
GHSA-pf3p-x6qj-6j7q
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-188
Updated
2026-11-02
OSVRUSTSEC-2020-0081 5.5

`mio` invalidly assumes the memory layout of std::net::SocketAddr

The mio 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.

Record
RUSTSEC-2020-0081
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2020-35922 5.5

An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

Record
UBUNTU-CVE-2020-35922
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
mio
crates.io
0.7.0 up to 0.7.6
0.7.6
rust-mio
Ubuntu:20.04:LTS
All versions, plus listed versions
0.6.16-1
None known
rust-mio
Ubuntu:22.04:LTS
All versions, plus listed versions
0.6.23-10.7.14-1
None known
rust-mio
Ubuntu:24.04:LTS
All versions, plus listed versions
0.8.8-10.8.10-1
None known
rust-mio
Ubuntu:25.10
All versions, plus listed versions
1.0.2-3
None known
rust-mio
Ubuntu:26.10
All versions, plus listed versions
1.1.1-11.2.0-1
None known
rust-mio
Ubuntu:26.04:LTS
All versions, plus listed versions
1.0.2-31.1.1-1
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2020-35922 is a medium vulnerability (CVSS 5.5) in Mio Project Mio, published November 2, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in mio 0.7.6.

References

Show 4 moreShow less
MoveEnter Open