{"id":"CVE-2020-35922","aliases":["EUVD-2021-1816","GHSA-pf3p-x6qj-6j7q","RUSTSEC-2020-0081","UBUNTU-CVE-2020-35922"],"status":"published","title":"mio invalidly assumes the memory layout of std::net::SocketAddr","description":"An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00391,"percentile":0.3348,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-188"],"published":"2020-11-02T12:00:00Z","modified":"2026-10-24T10:30:17Z","fixes":[{"ecosystem":"crates.io","package":"mio","fixed_in":["0.7.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.7.0"},{"fixed":"0.7.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"mio","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"0.7.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"mio","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"0.7.6"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rust-mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.16-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"rust-mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.23-1","0.7.14-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.8.8-1","0.8.10-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rust-mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.2-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rust-mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1.1-1","1.2.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rust-mio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.2-3","1.1.1-1"]}],"products":[{"vendor":"mio_project","product":"mio"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0081.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web","advisory","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35922","tags":["advisory"]},{"url":"https://github.com/tokio-rs/mio/issues/1386","tags":["web","report"]},{"url":"https://github.com/tokio-rs/mio/pull/1388","tags":["web"]},{"url":"https://github.com/tokio-rs/mio/commit/152e0751f0be1c9b0cbd6778645b76bcb0eba93c","tags":["web"]},{"url":"https://github.com/advisories/GHSA-pf3p-x6qj-6j7q"},{"url":"https://github.com/tokio-rs/mio","tags":["package"]},{"url":"https://crates.io/crates/mio","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2020-35922","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-35922","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-35922","description":"An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.","status":"published","published":"2020-12-31T08:17:30Z","modified":"2024-08-04T17:16:13.238Z","updated_at":"2026-11-02T14:35:57.975444Z"}],"euvd":[{"id":"EUVD-2021-1816","description":"An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.","status":"published","published":"2020-12-31T08:17:30Z","modified":"2024-08-04T17:16:13Z","updated_at":"2026-11-03T03:07:04.595509Z"}],"ghsa":[{"id":"GHSA-pf3p-x6qj-6j7q","title":"mio invalidly assumes the memory layout of std::net::SocketAddr","description":"The mio 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.","status":"published","published":"2021-08-25T20:50:33Z","modified":"2023-06-13T18:43:02Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-188"],"updated_at":"2026-11-02T14:36:53.654352Z"}],"nvd":[{"id":"CVE-2020-35922","description":"An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.","status":"published","published":"2020-12-31T09:15:16.147Z","modified":"2026-06-17T03:14:36.733Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","level":"low","assessor":"primary"}],"updated_at":"2026-11-02T14:06:28.340168Z"}],"osv":[{"id":"CVE-2020-35922","description":"An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.","status":"published","published":"2020-12-31T09:15:16.147Z","modified":"2026-10-24T10:30:17.01236223Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:16.612899Z"},{"id":"GHSA-pf3p-x6qj-6j7q","title":"mio invalidly assumes the memory layout of std::net::SocketAddr","description":"The mio 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.","status":"published","published":"2021-08-25T20:50:33Z","modified":"2023-11-08T04:03:39.529809Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-188"],"updated_at":"2026-11-02T15:46:52.891208Z"},{"id":"RUSTSEC-2020-0081","title":"`mio` invalidly assumes the memory layout of std::net::SocketAddr","description":"The [`mio`](https://crates.io/crates/mio) 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.","status":"published","published":"2020-11-02T12:00:00Z","modified":"2023-11-08T04:03:39.529809Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:39.492624Z"},{"id":"UBUNTU-CVE-2020-35922","description":"An issue was discovered in the mio crate before 0.7.6 for Rust. It has false expectations about the std::net::SocketAddr memory representation.","status":"published","published":"2020-12-31T09:15:00Z","modified":"2026-10-17T12:55:53.033260805Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:25.179924Z"}]}}
