CVE-2020-35919
`net2` invalidly assumes the memory layout of std::net::SocketAddr
An issue was discovered in the net2 crate before 0.2.36 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
What each source reports
NVD Score used
5.5
An issue was discovered in the net2 crate before 0.2.36 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
CVE-2020-35919- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 2.1 Low
AV: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 net2 crate before 0.2.36 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
CVE-2020-35919- Updated
- 2026-11-02
EUVDEUVD-2022-3525 No score
An issue was discovered in the net2 crate before 0.2.36 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
EUVD-2022-3525- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-c79c-gwph-gqfm
5.5
`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.
- Record
GHSA-c79c-gwph-gqfm- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSV
5.5
An issue was discovered in the net2 crate before 0.2.36 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
CVE-2020-35919- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCVE-2020-35920
5.5
An issue was discovered in the socket2 crate before 0.3.16 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
CVE-2020-35920- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSVDEBIAN-CVE-2020-35919
5.5
An issue was discovered in the net2 crate before 0.2.36 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
DEBIAN-CVE-2020-35919- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-458v-4hrf-g3m4
5.5
socket2 invalidly assumes the memory layout of std::net::SocketAddr
The socket2 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-458v-4hrf-g3m4- CVSS 3.1
- 5.5 Medium
CVSS: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
OSVGHSA-c79c-gwph-gqfm
5.5
`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.
- Record
GHSA-c79c-gwph-gqfm- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRUSTSEC-2020-0078
5.5
`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.
- Record
RUSTSEC-2020-0078- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRUSTSEC-2020-0079
5.5
`socket2` invalidly assumes the memory layout of std::net::SocketAddr
The socket2 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-0079- CVSS 3.1
- 5.5 Medium
CVSS: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-35919
5.5
An issue was discovered in the net2 crate before 0.2.36 for Rust. It has false expectations about the std::net::SocketAddr memory representation.
- Record
UBUNTU-CVE-2020-35919- CVSS 3.1
- 5.5 Medium
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
net2crates.io |
before 0.2.36 | 0.2.36 |
rust-net2Debian:12 |
before 0.2.37-1 | 0.2.37-1 |
rust-net2Debian:13 |
before 0.2.37-1 | 0.2.37-1 |
rust-net2Debian:14 |
before 0.2.37-1 | 0.2.37-1 |
socket2crates.io |
before 0.3.16 | 0.3.16 |
net2crates.io |
0.0.0-0 up to 0.2.36 | 0.2.36 |
socket2crates.io |
0.0.0-0 up to 0.3.16 | 0.3.16 |
rust-net2Ubuntu:20.04:LTS |
All versions, plus listed versions 0.2.33-1 |
None known |
rust-net2Ubuntu:22.04:LTS |
All versions, plus listed versions 0.2.37-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2020-35919 is a medium vulnerability (CVSS 5.5) in Net2 Project Net2, published November 6, 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 net2 0.2.36.