CVE-2020-35924: Try mutex Data Races Vulnerability

MODERATE
Advisory Identifier: GHSA-64j8-7gp2-xjx5
CVSS 5.5
CWE-787
Published
Advisory Summary

CVE-2020-35924 is a MODERATE (CVSS 5.5) data races vulnerability (CWE-787: Out-of-bounds Write) affecting Try mutex libraries in the crates.io ecosystem. The issue involves data races in try-mutex. Remediation is available by upgrading affected packages to version 0.3.0.

CVE-2020-35924 at a Glance

CVE Identifier CVE-2020-35924
GHSA Identifier GHSA-64j8-7gp2-xjx5
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-787: Out-of-bounds Write
Affected Product Try mutex
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2020-35924

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

try-mutex fixed: 0.3.0
Upgrade try-mutex to 0.3.0
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 try-mutex

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-35924, inspect your project dependencies for Try mutex:

inspect dependencies for try-mutex

Analyze the terminal output to locate any version of Try mutex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.0), 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 CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Try mutex, 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 of this crate unconditionally implemented Sync trait for TryMutex<T> type. This allows users to put non-Send T type in TryMutex and send it to another thread, which can cause a data race. The flaw was corrected in the 0.3.0 release by adding T: Send bound for the Sync trait implementation.

CVE-2020-35924 Affected Try mutex Versions

1 component(s)
Fixed Versions:
0.3.0
Product / Package Ecosystem Affected Versions Fixed Version
try-mutex
crates.io
< 0.3.0
0.3.0

References

Frequently Asked Questions

What is CVE-2020-35924?
CVE-2020-35924 is a security vulnerability in Try mutex involving Data races in try-mutex under CWE-787: Out-of-bounds Write.
Which Try mutex versions are affected?
Affected versions include releases prior to 0.3.0 across affected packages: try-mutex.
What version fixes CVE-2020-35924?
Upgrading to 0.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is try-mutex affected?
Yes, try-mutex is affected in releases prior to 0.3.0. Upgrade your dependency to 0.3.0 or later.
What is the CVSS score of CVE-2020-35924?
CVE-2020-35924 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2020-35924?
CVE-2020-35924 is classified under CWE-787: Out-of-bounds Write (The product writes data past the end, or before the beginning, of the intended buffer.).
How can I check crates.io dependencies for CVE-2020-35924?
Run the dependency tree command: 'inspect dependencies for try-mutex'. 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-64j8-7gp2-xjx5",
  "modified" : "2023-06-13T22:26:24Z",
  "published" : "2021-08-25T20:50:28Z",
  "aliases" : [ "CVE-2020-35924" ],
  "summary" : "Data races in try-mutex",
  "details" : "Affected versions of this crate unconditionally implemented Sync trait for TryMutex<T> type. This allows users to put non-Send T type in TryMutex and send it to another thread, which can cause a data race. The flaw was corrected in the 0.3.0 release by adding T: Send bound for the Sync trait implementation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "try-mutex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-35924"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mpdn/try-mutex/issues/2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mpdn/try-mutex"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2020-0087.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-787" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-19T18:54:53Z",
    "nvd_published_at" : null
  }
}