Advisory

RUSTSEC-2020-0115

Also known as: CVE-2020-36435, GHSA-fqq2-xp7m-xvm8

Summary

Singleton lacks bounds on Send and Sync.

Details

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.

Severity

High Basis: CVSS v3 score 8.1, vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2020-11-16 12:00 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

ruspiro-singleton

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.4.1 (semver)

Fixed versions

0.4.1

Fix

  • Fixed version 0.4.1
    cargo update -p ruspiro-singleton --precise 0.4.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences