CVE-2019-16778 Heap buffer overflow in `UnsortedSegmentSum` in TensorFlow
An integer overflow in TensorFlow's UnsortedSegmentSum can cause heap buffer overflows, potentially leading to denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2019-16778?
CVE-2019-16778 is a low-severity vulnerability in Google Tensorflow, published on 16 Dec 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
In TensorFlow before 1.15, a heap buffer overflow in UnsortedSegmentSum can be produced when the Index template argument is int32. In this case data_size and num_segments 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.
Which versions are affected by CVE-2019-16778?
9 open source packages ship an affected version, including tensorflow, tensorflow-cpu and tensorflow-gpu. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
tensorflow PyPI | All versions | 1.15.0 |
tensorflow PyPI | All versions | 1.15.0 |
tensorflow PyPI | From 1.0.0 | 1.15.0 |
tensorflow-cpu PyPI | All versions | 1.15.0 |
tensorflow-cpu PyPI | All versions | 1.15.0 |
tensorflow-cpu PyPI | From 1.0.0 | 1.15.0 |
3 more packages
tensorflow-gpu PyPI | All versions | 1.15.0 |
tensorflow-gpu PyPI | All versions | 1.15.0 |
tensorflow-gpu PyPI | From 1.0.0 | 1.15.0 |
Products include Google Tensorflow.
How do I fix CVE-2019-16778?
Upgrade tensorflow to 1.15.0 or later.
Is CVE-2019-16778 being exploited?
There is no known exploitation of CVE-2019-16778 in the wild and no public exploit code.
Other vulnerabilities in Google Tensorflow
- CVE-2023-25668 TensorFlow vulnerable to heap out-of-buffer read in the QuantizeAndDequantize operation
- CVE-2018-7575 Integer Overflow or Wraparound in Google TensorFlow
- CVE-2021-37678 Arbitrary code execution due to YAML deserialization
- CVE-2021-35958 Path traversal in n/a
- CVE-2020-15202 Integer truncation in Shard API usage
Sources
Also known as GHSA-844w-j86r-4x2j, PYSEC-2019-209, PYSEC-2019-227, PYSEC-2019-234.