Skip to content
OpenAdvisories
Medium · 5.9 CVE-2020-15265 BIT-tensorflow-2020-15265EUVD-2020-0211GHSA-rrfp-j2mp-hq9cPYSEC-2020-138PYSEC-2020-295PYSEC-2020-330

Segfault in Tensorflow

Published Oct 21, 2020 · Updated Aug 4, 2024 · Assigned by GitHub_M

Description

In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a dimension outside the rank of the input tensor in the C++ kernel implementation. However, dim_size only does a DCHECK to validate the argument and then uses it to access the corresponding element of an array. Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array. The issue is patched in eccb7ec454e6617738554a255d77f08e60ee0808 and TensorFlow 2.4.0 will be released containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.

Affected products

VendorProductAffectedFixed
tensorflow tensorflow < 2.4.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI tensorflow < 2.4.0 2.4.0 GHSA-rrfp-j2mp-hq9c
PyPI tensorflow-cpu < 2.4.0 2.4.0 GHSA-rrfp-j2mp-hq9c
PyPI tensorflow-gpu < 2.4.0 2.4.0 GHSA-rrfp-j2mp-hq9c

References