rustsec-2019-0023
Vulnerability from osv_rustsec
Published
2019-08-24 12:00
Modified
2023-06-13 13:10
Summary
Cloned interners may read already dropped strings
Details

Affected versions of this crate did not clone contained strings when an interner is cloned. Interners have raw pointers to the contained strings, and they keep pointing the strings which the old interner owns, after the interner is cloned. If a new cloned interner is alive and the old original interner is dead, the new interner has dangling pointers to the old interner's storage, which is already dropped.

This allows an attacker to read the already freed memory. The dangling pointers are used by the interners to check a string is already interned. An attacker can do brute force attack to get the data pointed by the dangling pointer.

The flaw was corrected by https://github.com/Robbepop/string-interner/pull/10. This patch implements Clone manually to the interner type, so that the internal raw pointers always point the strings owned by the same interner.

PR #10 was also backported to the 0.6 release line in https://github.com/Robbepop/string-interner/pull/14 and was released in 0.6.4.


{
  "affected": [
    {
      "database_specific": {
        "categories": [],
        "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "string-interner",
        "purl": "pkg:cargo/string-interner"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.6.4"
            },
            {
              "introduced": "0.7.0-0"
            },
            {
              "fixed": "0.7.1"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "CVE-2019-16882",
    "GHSA-49fq-pw77-6qxj"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "Affected versions of this crate did not clone contained strings when an interner is cloned.\nInterners have raw pointers to the contained strings, and they keep pointing the strings which the old interner owns, after the interner is cloned.\nIf a new cloned interner is alive and the old original interner is dead, the new interner has dangling pointers to the old interner\u0027s storage, which is already dropped.\n\nThis allows an attacker to read the already freed memory.\nThe dangling pointers are used by the interners to check a string is already interned.\nAn attacker can do brute force attack to get the data pointed by the dangling pointer.\n\nThe flaw was corrected by \u003chttps://github.com/Robbepop/string-interner/pull/10\u003e.\nThis patch implements `Clone` manually to the interner type, so that the internal raw pointers always point the strings owned by the same interner.\n\nPR #10 was also backported to the 0.6 release line in\n\u003chttps://github.com/Robbepop/string-interner/pull/14\u003e and was released in 0.6.4.",
  "id": "RUSTSEC-2019-0023",
  "modified": "2023-06-13T13:10:24Z",
  "published": "2019-08-24T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/string-interner"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2019-0023.html"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/Robbepop/string-interner/issues/9"
    }
  ],
  "related": [],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Cloned interners may read already dropped strings"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…