RUSTSEC-2021-0070

Source
https://rustsec.org/advisories/RUSTSEC-2021-0070
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0070.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2021-0070
Aliases
Published
2021-06-06T12:00:00Z
Modified
2023-11-08T04:06:25.921387Z
Summary
VecStorage Deserialize Allows Violation of Length Invariant
Details

The Deserialize implementation for VecStorage did not maintain the invariant that the number of elements must equal nrows * ncols. Deserialization of specially crafted inputs could allow memory access beyond allocation of the vector.

This flaw was introduced in v0.11.0 (<code>086e6e</code>) due to the addition of an automatically derived implementation of Deserialize for MatrixVec. MatrixVec was later renamed to VecStorage in v0.16.13 (<code>0f66403</code>) and continued to use the automatically derived implementation of Deserialize.

This flaw was corrected in commit <code>5bff536</code> by returning an error during deserialization if the number of elements does not exactly match the expected size.

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

Affected packages

crates.io / nalgebra

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.11.0
Fixed
0.27.1

Ecosystem specific

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

Database specific

categories
[
    "memory-corruption",
    "memory-exposure"
]
cvss
null
informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0070.json"