RUSTSEC-2019-0023

Source
https://rustsec.org/advisories/RUSTSEC-2019-0023
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2019-0023.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2019-0023
Aliases
Published
2019-08-24T12:00:00Z
Modified
2023-11-08T04:01:22.202134Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / string-interner

Package

Name
string-interner
View open source insights on deps.dev
Purl
pkg:cargo/string-interner

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.6.4
Introduced
0.7.0-0
Fixed
0.7.1

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

{
    "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
    "informational": null,
    "categories": []
}