CVE-2021-29614 (CNNVD-202105-873)

HIGH
中文标题:
Google TensorFlow 缓冲区错误漏洞
英文标题:
Interpreter crash from `tf.io.decode_raw`
CVSS分数: 7.1
发布时间: 2021-05-14 19:20:28
漏洞类型: 缓冲区错误
状态: PUBLISHED
数据质量分数: 0.30
数据版本: v3
漏洞描述
中文描述:

Google TensorFlow是美国谷歌(Google)公司的一套用于机器学习的端到端开源平台。 Google TensorFlow 2.4.2,2.3.3,2.2.3,2.1.4版本存在安全漏洞,该漏洞源于tf.io.decode_raw的实现会产生不正确的结果,并在组合固定长度和更宽的数据类型时导致Python解释器崩溃。

英文描述:

TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.io.decode_raw` produces incorrect results and crashes the Python interpreter when combining `fixed_length` and wider datatypes. The implementation of the padded version(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc) is buggy due to a confusion about pointer arithmetic rules. First, the code computes(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L61) the width of each output element by dividing the `fixed_length` value to the size of the type argument. The `fixed_length` argument is also used to determine the size needed for the output tensor(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L63-L79). This is followed by reencoding code(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L85-L94). The erroneous code is the last line above: it is moving the `out_data` pointer by `fixed_length * sizeof(T)` bytes whereas it only copied at most `fixed_length` bytes from the input. This results in parts of the input not being decoded into the output. Furthermore, because the pointer advance is far wider than desired, this quickly leads to writing to outside the bounds of the backing data. This OOB write leads to interpreter crash in the reproducer mentioned here, but more severe attacks can be mounted too, given that this gadget allows writing to periodically placed locations in memory. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

CWE类型:
CWE-665 CWE-787
标签:
(暂无数据)
受影响产品
厂商 产品 版本 版本范围 平台 CPE
tensorflow tensorflow < 2.1.4 - - cpe:2.3:a:tensorflow:tensorflow:<_2.1.4:*:*:*:*:*:*:*
tensorflow tensorflow >= 2.2.0, < 2.2.3 - - cpe:2.3:a:tensorflow:tensorflow:>=_2.2.0,_<_2.2.3:*:*:*:*:*:*:*
tensorflow tensorflow >= 2.3.0, < 2.3.3 - - cpe:2.3:a:tensorflow:tensorflow:>=_2.3.0,_<_2.3.3:*:*:*:*:*:*:*
tensorflow tensorflow >= 2.4.0, < 2.4.2 - - cpe:2.3:a:tensorflow:tensorflow:>=_2.4.0,_<_2.4.2:*:*:*:*:*:*:*
google tensorflow * - - cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*
解决方案
中文解决方案:
(暂无数据)
英文解决方案:
(暂无数据)
临时解决方案:
(暂无数据)
参考链接
无标题 x_refsource_CONFIRM
cve.org
访问
无标题 x_refsource_MISC
cve.org
访问
CVSS评分详情
3.1 (cna)
HIGH
7.1
CVSS向量: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
机密性
NONE
完整性
HIGH
可用性
HIGH
时间信息
发布时间:
2021-05-14 19:20:28
修改时间:
2024-08-03 22:11:06
创建时间:
2025-11-11 15:36:48
更新时间:
2025-11-11 15:56:45
利用信息
暂无可利用代码信息
数据源详情
数据源 记录ID 版本 提取时间
CVE cve_CVE-2021-29614 2025-11-11 15:20:55 2025-11-11 07:36:48
NVD nvd_CVE-2021-29614 2025-11-11 14:57:37 2025-11-11 07:45:07
CNNVD cnnvd_CNNVD-202105-873 2025-11-11 15:10:38 2025-11-11 07:56:45
版本与语言
当前版本: v3
主要语言: EN
支持语言:
EN ZH
安全公告
暂无安全公告信息
变更历史
v3 CNNVD
2025-11-11 15:56:45
vulnerability_type: 未提取 → 缓冲区错误; cnnvd_id: 未提取 → CNNVD-202105-873; data_sources: ['cve', 'nvd'] → ['cnnvd', 'cve', 'nvd']
查看详细变更
  • vulnerability_type: 未提取 -> 缓冲区错误
  • cnnvd_id: 未提取 -> CNNVD-202105-873
  • data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
v2 NVD
2025-11-11 15:45:07
affected_products_count: 4 → 5; data_sources: ['cve'] → ['cve', 'nvd']
查看详细变更
  • affected_products_count: 4 -> 5
  • data_sources: ['cve'] -> ['cve', 'nvd']