PT-2021-21998 · Nalgebra · Nalgebra

Published

2021-06-06

·

Updated

2021-08-25

·

CVE-2021-38190

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions: nalgebra crate versions prior to 0.27.1
Description: The issue 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. This is due to the Deserialize implementation for VecStorage not maintaining 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.
Recommendations: For versions prior to 0.27.1, update to version 0.27.1 or later to resolve the issue. As a temporary workaround, consider adding error checking during deserialization to ensure the number of elements matches the expected size, similar to the correction made in commit 5bff536. Restrict deserialization of untrusted inputs to minimize the risk of exploitation.

Exploit

Fix

Buffer Overflow

Memory Corruption

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

AZL-41989
CVE-2021-38190
GHSA-3W8G-XR3F-2MP8
RUSTSEC-2021-0070

Affected Products

Nalgebra