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

Not scored Published

The threadalone crate may drop non-Send types on the wrong thread, causing undefined behavior and potential crashes or code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is GHSA-w59h-378f-2frm?

GHSA-w59h-378f-2frm is a vulnerability in threadalone, published on 7 Jan 2024.

Official 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.

Which versions are affected by GHSA-w59h-378f-2frm?

3 open source packages ship an affected version, including threadalone.

PackageAffectedFixed in
threadalone crates.ioAll versions0.2.1
threadalone crates.ioAll versions0.2.1
threadalone crates.ioFrom 0.0.0-00.2.1

How do I fix GHSA-w59h-378f-2frm?

Upgrade threadalone to 0.2.1 or later.

Is GHSA-w59h-378f-2frm being exploited?

There is no known exploitation of GHSA-w59h-378f-2frm in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2024-0005.

Is GHSA-w59h-378f-2frm in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free