Skip to content

Data races in generator

Moderate severity GitHub Reviewed Published Aug 25, 2021 to the GitHub Advisory Database • Updated Jan 9, 2023
Withdrawn This advisory was withdrawn on Aug 24, 2021

Package

cargo generator (Rust)

Affected versions

< 0.7.0

Patched versions

0.7.0

Description

The Generator type is an iterable which uses a generator function that yields
values. In affected versions of the crate, the provided function yielding values
had no Send bounds despite the Generator itself implementing Send.

The generator function lacking a Send bound means that types that are
dangerous to send across threads such as Rc could be sent as part of a
generator, potentially leading to data races.

This flaw was fixed in commit f7d120a3b
by enforcing that the generator function be bound by Send.

References

Reviewed Aug 18, 2021
Withdrawn Aug 24, 2021
Published to the GitHub Advisory Database Aug 25, 2021
Last updated Jan 9, 2023

Severity

Moderate

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-h6gg-fvf5-qgwf
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.