Advisory

PYSEC-2021-846

Also known as: BIT-tensorflow-2021-41195, CVE-2021-41195, GHSA-cq76-mxrc-vchh, PYSEC-2021-842, PYSEC-2021-844

Summary

The record has no summary.

Details

TensorFlow is an open source platform for machine learning. In affected versions the implementation of tf.math.segment_* operations results in a CHECK-fail related abort (and denial of service) if a segment id in segment_ids is large. This is similar to CVE-2021-29584 (and similar other reported vulnerabilities in TensorFlow, localized to specific APIs): the implementation (both on CPU and GPU) computes the output shape using AddDim. However, if the number of elements in the tensor overflows an int64_t value, AddDim results in a CHECK failure which provokes a std::abort. Instead, code should use AddDimWithStatus. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.

Severity

Not rated by the source.

Dates

Published
2021-11-05 20:15 UTC
Modified
2023-12-06 01:01 UTC

Affected packages and fixes

tensorflow-gpu

PyPI · All systems

Affected

  • introduced 0, fixed 2.4.4, introduced 2.5.0, fixed 2.5.2, introduced 2.6.0, fixed 2.6.1 (ecosystem)

Fixed versions

2.4.4, 2.5.2, 2.6.1

Fix

  • Fixed version 2.4.4
    pip install --upgrade tensorflow-gpu==2.4.4
  • Fixed version 2.5.2
    pip install --upgrade tensorflow-gpu==2.5.2
  • Fixed version 2.6.1
    pip install --upgrade tensorflow-gpu==2.6.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences