Niedrig

Undefined behavior and `CHECK`-fail in `FractionalMaxPoolGrad`

  • Veröffentlicht: 14.05.2021
  • Aktualisiert: 11.10.2026 13:19

Impact

The implementation of tf.raw_ops.FractionalMaxPoolGrad triggers an undefined behavior if one of the input tensors is empty:

python
import tensorflow as tf

orig_input = tf.constant([2, 3], shape=[1, 1, 1, 2], dtype=tf.int64)
orig_output = tf.constant([], dtype=tf.int64) 
out_backprop = tf.zeros([2, 3, 6, 6], dtype=tf.int64)
row_pooling_sequence = tf.constant([0], shape=[1], dtype=tf.int64)
col_pooling_sequence = tf.constant([0], shape=[1], dtype=tf.int64)

tf.raw_ops.FractionalMaxPoolGrad(
  orig_input=orig_input, orig_output=orig_output, out_backprop=out_backprop,
  row_pooling_sequence=row_pooling_sequence,
  col_pooling_sequence=col_pooling_sequence, overlapping=False)

The code is also vulnerable to a denial of service attack as a CHECK condition becomes false and aborts the process

python
import tensorflow as tf

orig_input = tf.constant([1], shape=[1], dtype=tf.int64)
orig_output = tf.constant([1], shape=[1], dtype=tf.int64)
out_backprop = tf.constant([1, 1], shape=[2, 1, 1, 1], dtype=tf.int64)
row_pooling_sequence = tf.constant([1], shape=[1], dtype=tf.int64) 
col_pooling_sequence = tf.constant([1], shape=[1], dtype=tf.int64)

tf.raw_ops.FractionalMaxPoolGrad(
  orig_input=orig_input, orig_output=orig_output, out_backprop=out_backprop,
  row_pooling_sequence=row_pooling_sequence,
  col_pooling_sequence=col_pooling_sequence, overlapping=False)

The implementation fails to validate that input and output tensors are not empty and are of the same rank. Each of these unchecked assumptions is responsible for the above issues.

Patches

We have patched the issue in GitHub commit 32fdcbff9d06d010d908fcc4bd4b36eb3ce15925.

The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by Ying Wang and Yakun Zhang of Baidu X-Team.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) tensorflow < 2.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3, >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2
Python (PyPI) tensorflow-cpu < 2.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3, >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2
Python (PyPI) tensorflow-gpu < 2.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3, >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2

Verweise

CVSS-Wert 2.5/10
CVSS-Vektor
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
Schwäche (CWE)
CWE-908
Plattform
Python (PyPI)
Paket
tensorflow, tensorflow-cpu, tensorflow-gpu
Veröffentlicht
14.05.2021
Aktualisiert
11.10.2026 13:19

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2021-217 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2021-508 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2021-706 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-x8h6-xgqx-jqgp - CC BY 4.0

Schwachstellenhistorie: tensorflow-cpu

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (430) im Archiv
Einträge insgesamt
430
Erste → letzte
04.2019 07.2024
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 6
  • Hoch 111
  • Mittel 208
  • Niedrig 105

Veröffentlichungen pro Jahr

  1. 2019: 7
  2. 2020: 35
  3. 2021: 200
  4. 2022: 166
  5. 2023: 21
  6. 2024: 1
  7. 2025: 0
  8. 2026: 0
Schweregrad:
  1. Undefined behavior and `CHECK`-fail in `FractionalMaxPoolGrad` dieser Eintrag
    Niedrig · 2.5 CVE-2021-29580 < 2.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3, >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2
  2. Hoch · 7.5 CVE-2023-33976 < 2.12.1 2.12.1
  3. Hoch · 7.5 CVE-2023-25659 < 2.11.1 2.11.1
  4. Hoch · 7.5 CVE-2023-25660 < 2.11.1 2.11.1
  5. Hoch · 7.5 CVE-2023-25662 < 2.11.1 2.11.1
  6. Hoch · 7.5 CVE-2023-25663 < 2.11.1 2.11.1
  7. Hoch · 7.5 CVE-2023-25664 < 2.11.1 2.11.1
  8. Hoch · 7.5 CVE-2023-25665 < 2.11.1 2.11.1
  9. Hoch · 7.5 CVE-2023-25666 < 2.11.1 2.11.1
  10. Hoch · 7.5 CVE-2023-25669 < 2.11.1 2.11.1
  11. Hoch · 7.5 CVE-2023-25671 < 2.11.1 2.11.1
  12. Hoch · 7.5 CVE-2023-25672 < 2.11.1 2.11.1
  13. Hoch · 7.5 CVE-2023-25673 < 2.11.1 2.11.1
  14. Hoch · 7.5 CVE-2023-25674 < 2.11.1 2.11.1
  15. Hoch · 7.5 CVE-2023-25675 < 2.11.1 2.11.1
  16. Hoch · 7.5 CVE-2023-25676 < 2.11.1 2.11.1
  17. Hoch · 8.0 CVE-2023-25801 < 2.11.1 2.11.1
  18. Hoch · 7.5 CVE-2023-27579 < 2.11.1 2.11.1
  19. Hoch · 7.5 CVE-2023-25658 < 2.11.1 2.11.1
Mehr anzeigen (20) 21 von 118 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.