Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
6
Star
4
Fork
57
src-openEuler
/
tensorflow
Code
Issues
211
Pull Requests
8
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
CVE-2021-29614
Done
#I3SC4Z
CVE和安全问题
openeuler-ci-bot
owner
Opened this issue
2021-05-21 11:31
一、漏洞信息 漏洞编号:[CVE-2021-29614](https://nvd.nist.gov/vuln/detail/CVE-2021-29614) 漏洞归属组件:tensorflow 漏洞归属的版本:2.3.1 CVSS V3.0分值: BaseScore:7.8 High Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 漏洞简述: 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. 漏洞公开时间:2021-05-14 漏洞创建时间:2021-05-21 11:31:29 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2021-29614 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/doc/md/manual.md 二、漏洞分析结构反馈 影响性分析说明: TensorFlow 是一个端到端的机器学习开源平台。当结合“fixed_length”和更宽的数据类型时,“tf.io.decode_raw”的实现会产生错误的结果并导致 Python 解释器崩溃。由于对指针运算规则的混淆,填充版本(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc)的实现存在问题。首先,代码计算(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L61)每个输出元素的宽度除以`fixed size_length`值类型参数的。`fixed_length` 参数也用于确定输出张量所需的大小(https://github. com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L63-L79)。接下来是重新编码代码(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L85-L94)。错误的代码是上面的最后一行:它正在将 `out_data` 指针移动 `fixed_length * sizeof(T)` 字节,而它最多只从输入中复制 `fixed_length` 字节。这导致部分输入未被解码为输出。此外,由于指针前进比预期的要宽得多,这会很快导致写入到支持数据的边界之外。这个OOB写导致这里提到的复制器中的解释器崩溃,但也可以安装更严重的攻击,鉴于此小工具允许写入定期放置在内存中的位置。该修复将包含在 TensorFlow 2.5.0 中。我们还将在 TensorFlow 2.4.2、TensorFlow 2.3.3、TensorFlow 2.2.3 和 TensorFlow 2.1.4 上挑选此提交,因为它们也受到影响并且仍在支持范围内。 openEuler评分: 7.8 Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 受影响版本排查(受影响/不受影响): 1.master(2.3.1):受影响 2.openEuler-21.03(2.3.1):受影响 3.openEuler-21.09(2.3.1):受影响 修复是否涉及abi变化(是/否): 1.master(2.3.1):否 2.openEuler-21.03(2.3.1):否 3.openEuler-21.09(2.3.1):否
一、漏洞信息 漏洞编号:[CVE-2021-29614](https://nvd.nist.gov/vuln/detail/CVE-2021-29614) 漏洞归属组件:tensorflow 漏洞归属的版本:2.3.1 CVSS V3.0分值: BaseScore:7.8 High Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 漏洞简述: 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. 漏洞公开时间:2021-05-14 漏洞创建时间:2021-05-21 11:31:29 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2021-29614 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/doc/md/manual.md 二、漏洞分析结构反馈 影响性分析说明: TensorFlow 是一个端到端的机器学习开源平台。当结合“fixed_length”和更宽的数据类型时,“tf.io.decode_raw”的实现会产生错误的结果并导致 Python 解释器崩溃。由于对指针运算规则的混淆,填充版本(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc)的实现存在问题。首先,代码计算(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L61)每个输出元素的宽度除以`fixed size_length`值类型参数的。`fixed_length` 参数也用于确定输出张量所需的大小(https://github. com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L63-L79)。接下来是重新编码代码(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L85-L94)。错误的代码是上面的最后一行:它正在将 `out_data` 指针移动 `fixed_length * sizeof(T)` 字节,而它最多只从输入中复制 `fixed_length` 字节。这导致部分输入未被解码为输出。此外,由于指针前进比预期的要宽得多,这会很快导致写入到支持数据的边界之外。这个OOB写导致这里提到的复制器中的解释器崩溃,但也可以安装更严重的攻击,鉴于此小工具允许写入定期放置在内存中的位置。该修复将包含在 TensorFlow 2.5.0 中。我们还将在 TensorFlow 2.4.2、TensorFlow 2.3.3、TensorFlow 2.2.3 和 TensorFlow 2.1.4 上挑选此提交,因为它们也受到影响并且仍在支持范围内。 openEuler评分: 7.8 Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 受影响版本排查(受影响/不受影响): 1.master(2.3.1):受影响 2.openEuler-21.03(2.3.1):受影响 3.openEuler-21.09(2.3.1):受影响 修复是否涉及abi变化(是/否): 1.master(2.3.1):否 2.openEuler-21.03(2.3.1):否 3.openEuler-21.09(2.3.1):否
Comments (
6
)
Sign in
to comment
Status
Done
Backlog
已挂起
Doing
Done
Declined
Assignees
Not set
sinever
sinever
Assignee
Collaborator
+Assign
+Mention
Labels
CVE/FIXED
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (23)
Tags (18)
master
openEuler-24.03-LTS-SP3
openEuler-24.03-LTS-SP2
openEuler-24.03-LTS
openEuler-24.03-LTS-Next
openEuler-25.09
openEuler-25.03
openEuler-24.03-LTS-SP1
sync-pr89-openEuler-24.03-LTS-SP1-riscv64-to-openEuler-24.03-LTS-Next
openEuler-24.09
openEuler-23.09
openEuler-22.03-LTS-Next
openEuler-22.03-LTS-SP2
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-23.03
sync-pr58-N/A-to-openEuler-22.03-LTS-Next
sync-pr58-N/A-to-openEuler-22.03-LTS
openEuler-22.03-LTS
openEuler-22.09
openEuler-21.09
openEuler-21.03
openEuler-20.09
openEuler-24.03-LTS-SP2-release
openEuler-25.03-release
openEuler-24.03-LTS-SP1-release
openEuler-24.09-release
openEuler-22.03-LTS-SP4-release
openEuler-24.03-LTS-release
openEuler-22.03-LTS-SP3-release
openEuler-23.09-rc5
openEuler-22.09-release
openEuler-22.09-rc5
openEuler-22.09-20220829
openEuler-22.03-LTS-20220331
openEuler-22.03-LTS-round5
openEuler-22.03-LTS-round3
openEuler-22.03-LTS-round2
openEuler-22.03-LTS-round1
openEuler-21.03-20210330
openEuler-20.09-20200929
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(1)
1
https://gitee.com/src-openeuler/tensorflow.git
git@gitee.com:src-openeuler/tensorflow.git
src-openeuler
tensorflow
tensorflow
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register