GHSA-p5w9-856p-8q4g – socket2
Package
Manager: cargo
Name: socket2
Vulnerable Version: <0
Severity
Level: Medium
CVSS v3.1: N/A
CVSS v4.0: N/A
EPSS: N/A pctlN/A
Details
Assumed memory layout of std::net::SocketAddr The [`socket2`](https://crates.io/crates/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.
Metadata
Created: 2021-08-25T21:00:23Z
Modified: 2021-08-24T17:42:08Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-p5w9-856p-8q4g/GHSA-p5w9-856p-8q4g.json
CWE IDs: ["CWE-824"]
Alternative ID: N/A
Finding: N/A
Auto approve: 0