Security mailing lists by PureSourceCode

RUSTSEC-2022-0052

HIGH

`os_socketaddr` invalidly assumes the memory layout of std::net::SocketAddr

The os_socketaddr 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.

These layout were changed into idiomatic rust types in nightly std. Starting from rustc 1.64 the affected versions of this crate will have undefined behaviour.

Published
26 Aug 2022
Last modified
8 Nov 2023
Also known as
GHSA-c439-chv8-8g2j
Sources
OSV GHSA-c439-chv8-8g2jJSONOSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io os_socketaddr < 0.2.2 0.2.2
OSV crates.io os_socketaddr >= 0.0.0-0, < 0.2.2 0.2.2

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Aug 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Sep 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.