Skip to content

futures_task::noop_waker_ref can segfault due to dereferencing a NULL pointer

Moderate severity GitHub Reviewed Published May 24, 2022 to the GitHub Advisory Database • Updated Jun 13, 2023

Package

cargo futures-task (Rust)

Affected versions

< 0.3.5

Patched versions

0.3.5

Description

Affected versions of the crate used a UnsafeCell in thread-local storage to return a noop waker reference, assuming that the reference would never be returned from another thread.

This resulted in a segmentation fault crash if Waker::wake_by_ref() was called on a waker returned from another thread due to it attempting to dereference a pointer that wasn't accessible from the main thread.

References

Published by the National Vulnerability Database Dec 31, 2020
Published to the GitHub Advisory Database May 24, 2022
Reviewed Jun 16, 2022
Last updated Jun 13, 2023

Severity

Moderate
5.5
/ 10

CVSS base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Weaknesses

CVE ID

CVE-2020-35907

GHSA ID

GHSA-p9m5-3hj7-cp5r

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.