VDB
Sign up
MEDIUM5.5

PYSEC-2021-176

Quick fix

PYSEC-2021-176 — tensorflow: upgrade to the fixed version with the command below.

pip install --upgrade 'tensorflow>=4f663d4b8f0bec1b48da6fa091a7d29609980fa4'

Details

TensorFlow is an end-to-end open source platform for machine learning. Calling `tf.raw_ops.ImmutableConst`(https://www.tensorflow.org/api_docs/python/tf/raw_ops/ImmutableConst) with a `dtype` of `tf.resource` or `tf.variant` results in a segfault in the implementation as code assumes that the tensor contents are pure scalars. We have patched the issue in 4f663d4b8f0bec1b48da6fa091a7d29609980fa4 and will release TensorFlow 2.5.0 containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved. If using `tf.raw_ops.ImmutableConst` in code, you can prevent the segfault by inserting a filter for the `dtype` argument.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/tensorflow
Introduced in: 0Fixed in: 4f663d4b8f0bec1b48da6fa091a7d29609980fa4
Fixpip install --upgrade 'tensorflow>=4f663d4b8f0bec1b48da6fa091a7d29609980fa4'

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/tensorflow"]}'