# GHSA-w59h-378f-2frm: Unsound sending of non-Send types across threads in threadalone

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-01-07T12:00:00.000Z
- Modified: 2024-02-10T16:26:49.036Z
- 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][mutexguard]. If used with `Rc`, there would be a data race on the
reference count, which is likewise undefined behavior.

[mutexguard]: https://github.com/rust-lang/rust/issues/23465#issuecomment-82730326

(As written by GitHub Advisory Database.)

## Affected

- threadalone (crates.io): before 0.2.1; from 0.0.0-0 before 0.2.1

## References

- <https://github.com/cr0sh/threadalone/issues/1> (report, web)
- <https://rustsec.org/advisories/RUSTSEC-2024-0005.html> (advisory, web)
- <https://crates.io/crates/threadalone> (package)

## Sources

- GitHub Advisory Database: [GHSA-w59h-378f-2frm](https://github.com/advisories/GHSA-w59h-378f-2frm), CC-BY-4.0, modified 2024-02-10
- RustSec Advisory Database: [RUSTSEC-2024-0005](https://rustsec.org/advisories/RUSTSEC-2024-0005.html), CC0-1.0, modified 2024-02-10

---

Page: https://cve.day/GHSA-w59h-378f-2frm · Whole record: https://cve.day/GHSA-w59h-378f-2frm.json · Rebuilt by cve.day 2026-11-25T22:56:43.182Z
