GHSA-w59h-378f-2frm

Suggest an improvement
Source
https://github.com/advisories/GHSA-w59h-378f-2frm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-w59h-378f-2frm/GHSA-w59h-378f-2frm.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-w59h-378f-2frm
Aliases
Published
2024-01-23T14:43:35Z
Modified
2024-02-10T16:26:49.036729Z
Summary
Unsound sending of non-Send types across threads in threadalone
Details

Affected versions can run the Drop impl of a non-Send type on a different thread than it was created on.

The flaw occurs when a stderr write performed by the threadalone crate fails, for example because stderr is redirected to a location on a filesystem that is full, or because stderr is a pipe that has been closed by the reader.

Dropping a non-Send type on the wrong thread is unsound. If used with a type such as a pthread-based MutexGuard, the consequence is undefined behavior. If used with Rc, there would be a data race on the reference count, which is likewise undefined behavior.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-01-23T14:43:35Z"
}
References

Affected packages

crates.io / threadalone

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.2.1