GHSA-P5W9-856P-8Q4G
Vulnerability from github – Published: 2021-08-25 21:00 – Updated: 2021-08-24 17:42
VLAI?
Summary
Assumed memory layout of std::net::SocketAddr
Details
The 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.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "socket2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.3.16"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-824"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-06T17:25:39Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "The [`socket2`](https://crates.io/crates/socket2) crate has assumed `std::net::SocketAddrV4`\nand `std::net::SocketAddrV6` have the same memory layout as the system C representation\n`sockaddr`. It has simply casted the pointers to convert the socket addresses to the\nsystem representation. The standard library does not say anything about the memory\nlayout, and this will cause invalid memory access if the standard library\nchanges the implementation. No warnings or errors will be emitted once the\nchange happens.\n",
"id": "GHSA-p5w9-856p-8q4g",
"modified": "2021-08-24T17:42:08Z",
"published": "2021-08-25T21:00:23Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/rust-lang/socket2-rs/issues/119"
},
{
"type": "PACKAGE",
"url": "https://github.com/rust-lang/socket2-rs"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2020-0079.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Assumed memory layout of std::net::SocketAddr",
"withdrawn": "2021-08-24T17:42:08Z"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…