
Cloud Vulnerability DB
A community-led vulnerabilities database
TensorFlow, an end-to-end open source platform for machine learning, contained a vulnerability in the MatrixSetDiagV* operations prior to versions 2.6.0, 2.5.1, 2.4.3, and 2.3.4. The vulnerability (CVE-2021-37658) was discovered and disclosed on August 11, 2021, affecting the input validation mechanism of diagonal matrix operations (GitHub Advisory).
The vulnerability stems from incomplete validation of the 'k' parameter tensor in MatrixSetDiagV* operations. While the code checks if the value is a scalar or vector, it fails to verify the number of elements. This oversight can lead to undefined behavior when accessing the first element of an empty tensor through the statement 'lower_diag_index = diag_index.flat()(0)', potentially resulting in a null pointer dereference (GitHub Advisory).
An attacker can trigger undefined behavior by providing an empty tensor as the 'k' parameter in MatrixSetDiagV* operations. This can be exploited through code such as 'tf.raw_ops.MatrixSetDiagV3(input=[1,2,3], diagonal=[1,1], k=[], align='RIGHT_LEFT')' (GitHub Advisory).
The issue has been patched in TensorFlow version 2.6.0 and backported to versions 2.5.1, 2.4.3, and 2.3.4. The fix adds validation to ensure the diag_index tensor has at least one element. Users are recommended to upgrade to these patched versions (GitHub Advisory).
The vulnerability was reported by members of the Aivul Team from Qihoo 360, demonstrating ongoing security research in the machine learning framework ecosystem (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."