{"id":"RUSTSEC-2022-0052","summary":"`os_socketaddr` invalidly assumes the memory layout of std::net::SocketAddr","details":"The [`os_socketaddr`](https://crates.io/crates/os_socketaddr) crate has assumed\n`std::net::SocketAddrV4` and `std::net::SocketAddrV6` have the same memory layout as the system C\nrepresentation `sockaddr`. It has simply casted the pointers to convert the socket addresses to the\nsystem representation.\n\nThese layout were [changed into idiomatic rust types](https://github.com/rust-lang/rust/pull/78802)\nin nightly `std`. Starting from rustc 1.64 the affected versions of this crate will have undefined\nbehaviour.","aliases":["GHSA-c439-chv8-8g2j"],"modified":"2023-11-08T04:18:12.374709Z","published":"2022-08-26T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/os_socketaddr"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2022-0052.html"},{"type":"REPORT","url":"https://github.com/a-ba/os_socketaddr/issues/3"}],"affected":[{"package":{"name":"os_socketaddr","ecosystem":"crates.io","purl":"pkg:cargo/os_socketaddr"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.2.2"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"os":[],"arch":[],"functions":[]}},"database_specific":{"cvss":null,"categories":["memory-corruption"],"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2022-0052.json","informational":"unsound"}}],"schema_version":"1.7.3"}