CVE-2020-35920: Medium severity socket2 vulnerability
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.
Other sources
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.
— GitHub
Affected Software
Event History
Frequently Asked Questions
What is CVE-2020-35920?
CVE-2020-35920 is an issue discovered in the socket2 crate before 0.3.16 for Rust.
What is the impact of CVE-2020-35920?
CVE-2020-35920 could lead to unexpected behavior and potential security vulnerabilities in applications using the affected socket2 crate.
How can I mitigate the vulnerability in CVE-2020-35920?
To mitigate the vulnerability in CVE-2020-35920, update your Rust projects to use version 0.3.16 or later of the socket2 crate.
Where can I find more information about CVE-2020-35920?
You can find more information about CVE-2020-35920 in the advisory at https://rustsec.org/advisories/RUSTSEC-2020-0079.html.
What is the severity rating of CVE-2020-35920?
CVE-2020-35920 has a severity rating of medium, with a CVSS score of 5.5.