CVE-2019-16778: Heap buffer overflow in `UnsortedSegmentSum` in TensorFlow
Impact
A heap buffer overflow in UnsortedSegmentSum can be produced when the Index template argument is int32. In this case datasize and numsegments fields are truncated from int64 to int32 and can produce negative numbers, resulting in accessing out of bounds heap memory.
This is unlikely to be exploitable and was detected and fixed internally. We are making the security advisory only to notify users that it is better to update to TensorFlow 1.15 or 2.0 or later as these versions already have this fixed.
Patches
Patched by db4f9717c41bccc3ce10099ab61996b246099892 and released in all official releases after 1.15 and 2.0.
For more information Please consult SECURITY.md for more information regarding the security model and how to contact us with issues and questions.
Other sources
In TensorFlow before 1.15, a heap buffer overflow in UnsortedSegmentSum can be produced when the Index template argument is int32. In this case datasize and numsegments fields are truncated from int64 to int32 and can produce negative numbers, resulting in accessing out of bounds heap memory. This is unlikely to be exploitable and was detected and fixed internally in TensorFlow 1.15 and 2.0.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2019-16778?
CVE-2019-16778 is classified as a high severity vulnerability due to the heap buffer overflow it causes.
How do I fix CVE-2019-16778?
To mitigate CVE-2019-16778, upgrade TensorFlow to version 1.15.0 or later.
Which versions of TensorFlow are affected by CVE-2019-16778?
CVE-2019-16778 affects TensorFlow versions from 1.0.0 up to, but not including, 1.15.0.
What types of systems are impacted by CVE-2019-16778?
CVE-2019-16778 impacts systems running vulnerable versions of TensorFlow in any environment.
What does CVE-2019-16778 exploit?
CVE-2019-16778 exploits a heap buffer overflow that can occur when specific template arguments are used.