Skip to content

Data race in ruspiro-singleton

High severity GitHub Reviewed Published Aug 25, 2021 to the GitHub Advisory Database • Updated Jan 27, 2023

Package

cargo ruspiro-singleton (Rust)

Affected versions

< 0.4.1

Patched versions

0.4.1

Description

Singleton<T> is meant to be a static object that can be initialized lazily. In
order to satisfy the requirement that static items must implement Sync,
Singleton implemented both Sync and Send unconditionally.

This allows for a bug where non-Sync types such as Cell can be used in
singletons and cause data races in concurrent programs.

The flaw was corrected in commit b0d2bd20e by adding trait bounds, requiring
the contaiend type to implement Sync.

References

Published by the National Vulnerability Database Aug 8, 2021
Reviewed Aug 18, 2021
Published to the GitHub Advisory Database Aug 25, 2021
Last updated Jan 27, 2023

Severity

High
8.1
/ 10

CVSS base metrics

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

CVE ID

CVE-2020-36435

GHSA ID

GHSA-fqq2-xp7m-xvm8
Checking history
See something to contribute? Suggest improvements for this vulnerability.