GHSA-w59h-378f-2frm: Threadalone Unsound Sending Of Non-Send Types Vulnerability

MODERATE
Published
Advisory Summary

GHSA-w59h-378f-2frm is a MODERATE unsound sending of non-send types vulnerability (General Security Weakness) affecting Threadalone libraries in the crates.io ecosystem. The issue involves unsound sending of non-send types across threads in threadalone. Remediation is available by upgrading affected packages to version 0.2.1.

GHSA-w59h-378f-2frm at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-w59h-378f-2frm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Threadalone
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-w59h-378f-2frm

To remediate this vulnerability, upgrade all affected Threadalone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

threadalone fixed: 0.2.1
Upgrade threadalone to 0.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for threadalone

How to Check if You Are Affected

To determine whether your application is affected by GHSA-w59h-378f-2frm, inspect your project dependencies for Threadalone:

inspect dependencies for threadalone

Analyze the terminal output to locate any version of Threadalone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Threadalone, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

GHSA-w59h-378f-2frm Affected Threadalone Versions

1 component(s)
Fixed Versions:
0.2.1
Product / Package Ecosystem Affected Versions Fixed Version
threadalone
crates.io
< 0.2.1
0.2.1

References

Frequently Asked Questions

What is GHSA-w59h-378f-2frm?
GHSA-w59h-378f-2frm is a security vulnerability in Threadalone involving Unsound sending of non-Send types across threads in threadalone under General Security Weakness.
Which Threadalone versions are affected?
Affected versions include releases prior to 0.2.1 across affected packages: threadalone.
What version fixes GHSA-w59h-378f-2frm?
Upgrading to 0.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is threadalone affected?
Yes, threadalone is affected in releases prior to 0.2.1. Upgrade your dependency to 0.2.1 or later.
What CWE is associated with GHSA-w59h-378f-2frm?
GHSA-w59h-378f-2frm is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-w59h-378f-2frm?
Run the dependency tree command: 'inspect dependencies for threadalone'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w59h-378f-2frm",
  "modified" : "2024-01-23T14:43:35Z",
  "published" : "2024-01-23T14:43:35Z",
  "aliases" : [ ],
  "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\nthread than it was created on.\n\nThe flaw occurs when a stderr write performed by the `threadalone` crate fails,\nfor example because stderr is redirected to a location on a filesystem that is\nfull, or because stderr is a pipe that has been closed by the reader.\n\nDropping a non-Send type on the wrong thread is unsound. If used with a type\nsuch as a pthread-based `MutexGuard`, [the consequence is undefined\nbehavior][mutexguard]. If used with `Rc`, there would be a data race on the\nreference count, which is likewise undefined behavior.\n\n[mutexguard]: https://github.com/rust-lang/rust/issues/23465#issuecomment-82730326\n\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "threadalone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cr0sh/threadalone/issues/1"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0005.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-23T14:43:35Z",
    "nvd_published_at" : null
  }
}