Vulnerability GHSA-pf3p-x6qj-6j7q

Medium Risk
MEDIUM RISK
CVSS Score: 5.5
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
5 years ago
August 25, 2021 at 08:50 PM UTC
mio invalidly assumes the memory layout of std::net::SocketAddr
0.7.0 - 0.7.5
0.7.0 - 0.7.5

Summary

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

Details

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.

Impacted packages

Timeline

Published
5 years ago
August 25, 2021 at 08:50 PM UTC
Fixed (0.7.6)
5 years ago
November 16, 2020 at 02:39 PM UTC
Last Modified
2 years ago
November 08, 2023 at 04:03 AM UTC