GHSA-w59h-378f-2frm
medium
Unsound sending of non-Send types across threads in threadalone
- Severity
- medium rating by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2024-0005
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| threadalone (crates.io) | before 0.2.1, from 0.0.0-0 before 0.2.1 | GitHub Advisory Database, RustSec Advisory Database |
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-w59h-378f-2frm changed 2024-02-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2024-0005 changed 2024-02-10 | CC0-1.0 |