CVE-2021-38190
JSON

9.8critical

Out of bounds write in nalgebra

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
1.41% (higher than 73% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-3w8g-xr3f-2mp8RUSTSEC-2021-0070

Description

An issue was discovered in the nalgebra crate before 0.27.1 for Rust. It allows out-of-bounds memory access because it does not ensure that the number of elements is equal to the product of the row count and column count.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
nalgebra (crates.io)from 0.11.0 before 0.27.1GitHub Advisory Database, RustSec Advisory Database
dimforge nalgebrabefore 0.27.1NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

An issue was discovered in the nalgebra crate before 0.27.1 for Rust. It allows out-of-bounds memory access because it does not ensure that the number of elements is equal to the product of the row count and column count.

GitHub Advisory Database

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 (086e6e) due to the addition of an automatically derived implementation of Deserialize for MatrixVec. MatrixVec was later renamed to VecStorage in v0.16.13 (0f66403) and continued to use the automatically derived implementation of Deserialize.

RustSec Advisory Database

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 (086e6e) due to the addition of an automatically derived implementation of Deserialize for MatrixVec. MatrixVec was later renamed to VecStorage in v0.16.13 (0f66403) and continued to use the automatically derived implementation of Deserialize.

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

NVD (es)

Se ha detectado un problema en la crate nalgebra versiones anteriores a 0.27.1 de Rust. Permite un acceso a la memoria fuera de límites porque no garantiza que el número de elementos sea igual al producto del recuento de filas y el recuento de columnas

References

Sources

SourceRecordLicence
CVE ListCVE-2021-38190 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-3w8g-xr3f-2mp8 changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0070 changed 2023-11-08CC0-1.0
NVDCVE-2021-38190 changed 2026-06-17Public domain