`os_socketaddr` invalidly assumes the memory layout of std::net::SocketAddr
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
The [`os_socketaddr`](https://crates.io/crates/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](https://github.com/rust-lang/rust/pull/78802) in nightly `std`. Starting from rustc 1.64 the affected versions of this crate will have undefined behaviour.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | os_socketaddr (crates.io) | before 0.2.2 | 0.2.2 | Patch available | GHSA-c439-chv8-8g2j |
- os_socketaddr (crates.io) Vendor— Affected before 0.2.2 Fixed in 0.2.2 Patch available GHSA-c439-chv8-8g2j
Remediation
- Fix · GHSA-c439-chv8-8g2j os_socketaddr (crates.io) Fixed in 0.2.2 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-c439-chv8-8g2j
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences