GHSA-w59h-378f-2frm Unsound sending of non-Send types across threads in threadalone
Unknown
- Published
- Updated
- Exploit status
- No public exploit known
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.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io threadalone(crates.io) | < 0.2.1; >= 0.0.0-0, < 0.2.1 | 0.2.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io threadalone(crates.io) | < 0.2.1 | 0.2.1 |
| crates.io threadalone(crates.io) | >= 0.0.0-0, < 0.2.1 | 0.2.1 |
References
- github.com issue-tracking
- rustsec.org vendor-advisory
- crates.io product
- github.com