Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. tensorflow-gpu
  4. ›
  5. CVE-2020-26268

CVE-2020-26268: Write to immutable memory region in TensorFlow

December 10, 2020 (updated October 28, 2024)

The tf.raw_ops.ImmutableConst operation returns a constant tensor created from a memory mapped file which is assumed immutable. However, if the type of the tensor is not an integral type, the operation crashes the Python interpreter as it tries to write to the memory area:

>>> import tensorflow as tf
>>> with open('/tmp/test.txt','w') as f: f.write('a'*128)
>>> tf.raw_ops.ImmutableConst(dtype=tf.string,shape=2,
memory_region_name='/tmp/test.txt')

If the file is too small, TensorFlow properly returns an error as the memory area has fewer bytes than what is needed for the tensor it creates. However, as soon as there are enough bytes, the above snippet causes a segmentation fault.

References

  • github.com/advisories/GHSA-hhvc-g5hv-48c6
  • github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-299.yaml
  • github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-334.yaml
  • github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-255.yaml
  • github.com/tensorflow/tensorflow
  • github.com/tensorflow/tensorflow/commit/c1e1fc899ad5f8c725dcbb6470069890b5060bc7
  • github.com/tensorflow/tensorflow/security/advisories/GHSA-hhvc-g5hv-48c6
  • nvd.nist.gov/vuln/detail/CVE-2020-26268

Code Behaviors & Features

Detect and mitigate CVE-2020-26268 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.15.5, all versions starting from 2.0.0 before 2.0.4, all versions starting from 2.1.0 before 2.1.3, all versions starting from 2.2.0 before 2.2.2, all versions starting from 2.3.0 before 2.3.2

Fixed versions

  • 1.15.5
  • 2.0.4
  • 2.1.3
  • 2.2.2
  • 2.3.2

Solution

Upgrade to versions 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2 or above.

Impact 4.4 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-471: Modification of Assumed-Immutable Data (MAID)

Source file

pypi/tensorflow-gpu/CVE-2020-26268.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:34 +0000.