GitHub Advisoryadvisory · crates.io
GHSA-49fq-pw77-6qxj Use after free in string-interner
HIGH
Official page ↗
- Aliases
- CVE-2019-16882
- Ecosystem
- crates.io
- Packages
- string-interner
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Weaknesses
- CWE-416
- Reviewed
- 2021-08-19
Affected packages
• crates.io string-interner: >= 0.7.0, < 0.7.1 → fixed in 0.7.1
• crates.io string-interner: < 0.6.4 → fixed in 0.6.4
Description
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.
Related
Alias · CVE (1)
- CVE-2019-16882 An issue was discovered in the string-interner crate before 0.7.1 for Rust. vulnerability
Weakness · CWE (1)
- CWE-416 Use After Free weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-16882 advisory
- https://github.com/Robbepop/string-interner/issues/9 web
- https://github.com/Robbepop/string-interner/pull/10 web
- https://github.com/Robbepop/string-interner/commit/d91dac0cfe42512526879cdfaac0b81beff54089 web
- https://github.com/Robbepop/string-interner package
- https://rustsec.org/advisories/RUSTSEC-2019-0023.html web