Headline
GHSA-fxgc-95xx-grvq: TensorFlow Denial of Service vulnerability
Impact
A malicious invalid input crashes a tensorflow model (Check Failed) and can be used to trigger a denial of service attack. To minimize the bug, we built a simple single-layer TensorFlow model containing a Convolution3DTranspose layer, which works well with expected inputs and can be deployed in real-world systems. However, if we call the model with a malicious input which has a zero dimension, it gives Check Failed failure and crashes.
import tensorflow as tf
class MyModel(tf.keras.Model):
def __init__(self):
super().__init__()
self.conv = tf.keras.layers.Convolution3DTranspose(2, [3,3,3], padding="same")
def call(self, input):
return self.conv(input)
model = MyModel() # Defines a valid model.
x = tf.random.uniform([1, 32, 32, 32, 3], minval=0, maxval=0, dtype=tf.float32) # This is a valid input.
output = model.predict(x)
print(output.shape) # (1, 32, 32, 32, 2)
x = tf.random.uniform([1, 32, 32, 0, 3], dtype=tf.float32) # This is an invalid input.
output = model(x) # crash
This Convolution3DTranspose layer is a very common API in modern neural networks. The ML models containing such vulnerable components could be deployed in ML applications or as cloud services. This failure could be potentially used to trigger a denial of service attack on ML cloud services.
Patches
We have patched the issue in
- GitHub commit 948fe6369a5711d4b4568ea9bbf6015c6dfb77e2
- GitHub commit 85db5d07db54b853484bfd358c3894d948c36baf.
The fix will be included in TensorFlow 2.12.0. We will also cherrypick this commit on TensorFlow 2.11.1
For more information
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
- GitHub Advisory Database
- GitHub Reviewed
- CVE-2023-25661
TensorFlow Denial of Service vulnerability
Moderate severity GitHub Reviewed Published Mar 27, 2023 in tensorflow/tensorflow • Updated Mar 27, 2023
Package
pip tensorflow (pip)
Affected versions
< 2.11.1
Impact
A malicious invalid input crashes a tensorflow model (Check Failed) and can be used to trigger a denial of service attack.
To minimize the bug, we built a simple single-layer TensorFlow model containing a Convolution3DTranspose layer, which works well with expected inputs and can be deployed in real-world systems. However, if we call the model with a malicious input which has a zero dimension, it gives Check Failed failure and crashes.
import tensorflow as tf
class MyModel(tf.keras.Model): def __init__(self): super().__init__() self.conv = tf.keras.layers.Convolution3DTranspose(2, [3,3,3], padding="same")
def call(self, input):
return self.conv(input)
model = MyModel() # Defines a valid model.
x = tf.random.uniform([1, 32, 32, 32, 3], minval=0, maxval=0, dtype=tf.float32) # This is a valid input. output = model.predict(x) print(output.shape) # (1, 32, 32, 32, 2)
x = tf.random.uniform([1, 32, 32, 0, 3], dtype=tf.float32) # This is an invalid input. output = model(x) # crash
This Convolution3DTranspose layer is a very common API in modern neural networks. The ML models containing such vulnerable components could be deployed in ML applications or as cloud services. This failure could be potentially used to trigger a denial of service attack on ML cloud services.
Patches
We have patched the issue in
- GitHub commit 948fe6369a5711d4b4568ea9bbf6015c6dfb77e2
- GitHub commit 85db5d07db54b853484bfd358c3894d948c36baf.
The fix will be included in TensorFlow 2.12.0. We will also cherrypick this commit on TensorFlow 2.11.1
For more information
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
References
- GHSA-fxgc-95xx-grvq
- keras-team/keras@85db5d0
- tensorflow/tensorflow@948fe63
Published to the GitHub Advisory Database
Mar 27, 2023
Last updated
Mar 27, 2023
Related news
Vulnerability in the Oracle Hyperion Financial Reporting product of Oracle Hyperion (component: Repository). The supported version that is affected is 11.2.13.0.000. Easily exploitable vulnerability allows low privileged attacker with network access via HTTP to compromise Oracle Hyperion Financial Reporting. While the vulnerability is in Oracle Hyperion Financial Reporting, attacks may significantly impact additional products (scope change). Successful attacks of this vulnerability can result in unauthorized access to critical data or complete access to all Oracle Hyperion Financial Reporting accessible data and unauthorized ability to cause a partial denial of service (partial DOS) of Oracle Hyperion Financial Reporting. CVSS 3.1 Base Score 8.5 (Confidentiality and Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L).
TensorFlow is an Open Source Machine Learning Framework. In versions prior to 2.11.1 a malicious invalid input crashes a tensorflow model (Check Failed) and can be used to trigger a denial of service attack. A proof of concept can be constructed with the `Convolution3DTranspose` function. This Convolution3DTranspose layer is a very common API in modern neural networks. The ML models containing such vulnerable components could be deployed in ML applications or as cloud services. This failure could be potentially used to trigger a denial of service attack on ML cloud services. An attacker must have privilege to provide input to a `Convolution3DTranspose` call. This issue has been patched and users are advised to upgrade to version 2.11.1. There are no known workarounds for this vulnerability.