PT-2021-23199 · Google · Tensorflow
Published
2021-11-05
·
Updated
2024-03-06
·
CVE-2021-41226
CVSS v3.1
7.1
High
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
TensorFlow versions prior to 2.7.0
TensorFlow versions 2.6.1 and earlier
TensorFlow versions 2.5.2 and earlier
TensorFlow versions 2.4.4 and earlier
Description
The implementation of
SparseBinCount is vulnerable to a heap out-of-bounds (OOB) access due to missing validation between the elements of the values argument and the shape of the sparse output. This issue can be exploited using the tf.raw ops.SparseBincount function with specifically crafted indices, values, dense shape, size, and weights parameters. The vulnerability is caused by a lack of validation in the for loop that iterates over the indices mat dimension, allowing an attacker to access memory outside the bounds of the out array.Recommendations
For versions prior to 2.7.0, update to TensorFlow 2.7.0 or later.
For versions 2.6.1 and earlier, update to TensorFlow 2.6.1 or later.
For versions 2.5.2 and earlier, update to TensorFlow 2.5.2 or later.
For versions 2.4.4 and earlier, update to TensorFlow 2.4.4 or later.
As a temporary workaround, consider disabling the use of
tf.raw ops.SparseBincount until a patch is available. Restrict access to the SparseBinCount function to minimize the risk of exploitation. Avoid using the values argument with unvalidated input in the affected API endpoint until the issue is resolved.Exploit
Fix
Out of bounds Read
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Tensorflow