{"id":"RUSTSEC-2020-0061","summary":"futures_task::noop_waker_ref can segfault due to dereferencing a NULL pointer","details":"Affected versions of the crate used a `UnsafeCell` in thread-local storage to return a noop waker reference,\nassuming that the reference would never be returned from another thread.\n\nThis resulted in a segmentation fault crash if `Waker::wake_by_ref()` was called on a waker returned from another thread due to \nit attempting to dereference a pointer that wasn't accessible from the main thread.\n\nReproduction Example (from issue):\n```rust\nuse futures_task::noop_waker_ref;\nfn main() {\n    let waker = std::thread::spawn(|| noop_waker_ref()).join().unwrap();\n    waker.wake_by_ref();\n}\n```\n\nThe flaw was corrected by using a `OnceCell::Lazy\u003c\u003e` wrapper around the noop waker instead of thread-local storage.","aliases":["CVE-2020-35907","GHSA-p9m5-3hj7-cp5r"],"modified":"2023-11-08T04:03:38.673466Z","published":"2020-05-03T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/futures-task"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2020-0061.html"},{"type":"REPORT","url":"https://github.com/rust-lang/futures-rs/issues/2091"}],"affected":[{"package":{"name":"futures-task","ecosystem":"crates.io","purl":"pkg:cargo/futures-task"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.5"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"functions":["futures_task::noop_waker_ref"],"os":[],"arch":[]}},"database_specific":{"categories":["denial-of-service"],"cvss":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0061.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}