rustsec-2021-0028
Vulnerability from osv_rustsec
Published
2021-02-19 12:00
Modified
2023-06-13 13:10
Summary
Multiple memory safety issues in insert_row
Details
When inserting rows from an iterator at a particular index, toodee would shift
items over, duplicating their ownership. The space reserved for the new elements
was based on the len() returned by the ExactSizeIterator.
This could result in elements in the array being freed twice if the iterator
panics. Uninitialized or previously freed elements could also be exposed if the
len() didn't match the number of elements.
These issues were fixed in commit ced70c17 by temporarily setting the length
of the array smaller while processing it and adding assertions on the number
of elements returned by the iterator.
{
"affected": [
{
"database_specific": {
"categories": [
"memory-corruption"
],
"cvss": null,
"informational": null
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [
"toodee::TooDee::insert_row"
],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "toodee",
"purl": "pkg:cargo/toodee"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "0.3.0"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"CVE-2021-28028",
"CVE-2021-28029",
"GHSA-wcvp-r8j8-47pc",
"GHSA-xm9m-2vj8-fmfr"
],
"database_specific": {
"license": "CC0-1.0"
},
"details": "When inserting rows from an iterator at a particular index, `toodee` would shift\nitems over, duplicating their ownership. The space reserved for the new elements\nwas based on the `len()` returned by the `ExactSizeIterator`.\n\nThis could result in elements in the array being freed twice if the iterator\npanics. Uninitialized or previously freed elements could also be exposed if the\n`len()` didn\u0027t match the number of elements.\n\nThese issues were fixed in commit `ced70c17` by temporarily setting the length\nof the array smaller while processing it and adding assertions on the number\nof elements returned by the iterator.",
"id": "RUSTSEC-2021-0028",
"modified": "2023-06-13T13:10:24Z",
"published": "2021-02-19T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/toodee"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2021-0028.html"
},
{
"type": "REPORT",
"url": "https://github.com/antonmarsden/toodee/issues/13"
}
],
"related": [],
"severity": [],
"summary": "Multiple memory safety issues in insert_row"
}
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…
Loading…