TensorFlow is an open source platform for machine learning. In affected versions the code behind tf.function
API can be made to deadlock when two tf.function
decorated Python functions are mutually recursive. This occurs due to using a non-reentrant Lock
Python object. Loading any model which contains mutually recursive functions is vulnerable. An attacker can cause denial of service by causing users to load such models and calling a recursive tf.function
, although this is not a frequent scenario. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Tensorflow | 2.4.0 (including) | 2.4.4 (excluding) | |
Tensorflow | 2.5.0 (including) | 2.5.2 (excluding) | |
Tensorflow | 2.6.0 (including) | 2.6.1 (excluding) | |
Tensorflow | 2.7.0-rc0 (including) | 2.7.0-rc0 (including) | |
Tensorflow | 2.7.0-rc1 (including) | 2.7.0-rc1 (including) |
Locking is a type of synchronization behavior that ensures that multiple independently-operating processes or threads do not interfere with each other when accessing the same resource. All processes/threads are expected to follow the same steps for locking. If these steps are not followed precisely - or if no locking is done at all - then another process/thread could modify the shared resource in a way that is not visible or predictable to the original process. This can lead to data or memory corruption, denial of service, etc.