File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ``` toml
2+ [advisory ]
3+ id = " RUSTSEC-0000-0000"
4+ package = " nb-connect"
5+ date = " 2021-02-14"
6+ url = " https://github.com/smol-rs/nb-connect/issues/1"
7+ keywords = [" memory" , " layout" , " cast" ]
8+ informational = " unsound"
9+
10+ [versions ]
11+ patched = [" >= 1.0.3" ]
12+ ```
13+
14+ # ` nb-connect ` invalidly assumes the memory layout of std::net::SocketAddr
15+
16+ The [ ` nb-connect ` ] ( https://crates.io/crates/nb-connect ) crate has assumed ` std::net::SocketAddrV4 `
17+ and ` std::net::SocketAddrV6 ` have the same memory layout as the system C representation
18+ ` sockaddr ` . It has simply casted the pointers to convert the socket addresses to the
19+ system representation. The standard library does not say anything about the memory
20+ layout, and this will cause invalid memory access if the standard library
21+ changes the implementation. No warnings or errors will be emitted once the
22+ change happens.
You can’t perform that action at this time.
0 commit comments