已开启
Fix CVE-2025-12060 in python-Keras for openEuler-24.03-LTS-SP1 #27
Fix CVE-2025-12060 in python-Keras for openEuler-24.03-LTS-SP1 #27
已开启
jixiang创建于 7月20日
jixiang
jixiang
7月20日

CVE

CVE-2025-12060

Official openEuler confirmation

  • Package: python-Keras
  • openEuler CVSS: 8.3 High
  • Affected product row: openEuler-24.03-LTS-SP1 / python-Keras / Affected / none_available-No solution or patch

Issue

Keras keras.utils.get_file(..., extract=True) extracts tar archives through tarfile.extractall() without the Python tar data filter. A crafted tar archive can abuse path traversal / link handling during extraction and write files outside the intended destination.

Fix

Backport the existing upstream/openEuler master fix for CVE-2025-12060:

  • add safe zip/tar member filters in keras/utils/data_utils.py
  • add extract_open_archive() and use filter=data on supported Python versions
  • route .keras archive extraction in keras/saving/saving_lib.py through the same safe extraction helper
  • add regression coverage for safe/unsafe tar entries

This is a minimal patch backport. It does not change public API or upgrade the package version.

Local verification

  • git diff --check origin/openEuler-24.03-LTS-SP1 HEAD: PASS
  • Source archive extraction: PASS
  • Existing patch stack + backport-Fix-CVE-2025-12060.patch dry-run: PASS
  • python -m py_compile keras/utils/data_utils.py: PASS
likedislike
合并受阻
jixiangjixiang
7月20日 创建了 pull request,commit c9edd978
openeuler-ci-botopeneuler-ci-bot成员
7月20日 将znzju,hubin95,Vchanger,chendh1设为审查人
openeuler-ci-botopeneuler-ci-bot成员
7月20日 添加了label:sig/A-Tune
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:

Welcome To openEuler Community

Hey @gca_u2301_82052726 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: A-Tune ,
and any of the maintainers: @Vchanger, @chendh1, @hubin95, @znzju ,

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:

当前仓库存在以下 保护分支 :

Protected Branch Version Release
master 2.12.0 2
openEuler-26.09 2.12.0 2
openEuler-24.03-LTS-SP4 2.12.0 2
openEuler-24.03-LTS-SP3 2.12.0 2
openEuler-24.03-LTS-SP1 2.12.0 2
openEuler-24.03-LTS-Next 2.12.0 2
openEuler-22.03-LTS-SP4 2.10.0 1
openEuler-EPOL-LTS
gu 2.3.1 3
20.09

评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作

注意:

  1. /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
  2. 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭
likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月20日 添加了label:openeuler-cla/yes
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/src-openeuler/trigger/python-Keras/9/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月20日 添加了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:

aarch64架构构建及构建后检查:multiarch/src-openeuler/aarch64/python-Keras/9/console

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:

x86_64架构构建及构建后检查:multiarch/src-openeuler/x86-64/python-Keras/9/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月20日 删除了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:
Check Name Build Result 详情 Build Details
check_binary_file ✅SUCCESS #9
check_lfsconfig :ballot_box_with_check:EXCLUDE
check_package_yaml_file ✅SUCCESS
check_repo_in_maintain ✅SUCCESS
check_consistency ✅SUCCESS
check_spec_file ✅SUCCESS
x86_64 check_build ✅SUCCESS #9
check_install ✅SUCCESS
check_license ✅SUCCESS
aarch64 check_build ✅SUCCESS #9
check_install ✅SUCCESS
check_license ✅SUCCESS
likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月20日 添加了label:ci_successful
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:

如下为接口变更检查结果,目标分支为openEuler-24.03-LTS-SP1,请PR提交者check差异信息

Arch Name Check Items Rpm Name Check Result Build Details
compare_package(x86_64) add_rpms ✅SUCCESS #9
delete_rpms ✅SUCCESS
rpm_files ✅SUCCESS
rpm_provides ✅SUCCESS
rpm_requires ✅SUCCESS
compare_package(aarch64) add_rpms ✅SUCCESS #9
delete_rpms ✅SUCCESS
rpm_files ✅SUCCESS
rpm_provides ✅SUCCESS
rpm_requires ✅SUCCESS
likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月20日 评论:
likedislike
jixiangjixiang
7月21日 预合并成功(commit_id: 140f5d3cbcc5939f4dd1ecdef2d10429ac2950bc)
jixiangjixiang
7月21日 强制推送  3 个提交:a7931101-2 commits from branch openEuler-24.03-LTS-SP1,62e05033-Fix CVE-2025-12060
jixiangjixiang
7月21日 预合并成功(commit_id: 990606c4e289b717b14b02a23cb3966e7c8eb481)
openeuler-ci-botopeneuler-ci-bot成员
7月21日 删除了label:openeuler-cla/yes
openeuler-ci-botopeneuler-ci-bot成员
7月21日 删除了label:ci_successful
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci_successful.

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 添加了label:openeuler-cla/yes
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/src-openeuler/trigger/python-Keras/19/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 添加了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

aarch64架构构建及构建后检查:multiarch/src-openeuler/aarch64/python-Keras/19/console

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

x86_64架构构建及构建后检查:multiarch/src-openeuler/x86-64/python-Keras/19/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 删除了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:
Check Name Build Result 详情 Build Details
check_binary_file ✅SUCCESS #19
check_lfsconfig :ballot_box_with_check:EXCLUDE
check_package_yaml_file ✅SUCCESS
check_repo_in_maintain ✅SUCCESS
check_consistency ✅SUCCESS
check_spec_file ✅SUCCESS
x86_64 check_build ❌FAILED #19
aarch64 check_build ❌FAILED #19
likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 添加了label:ci_failed
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:
likedislike
jixiangjixiang
7月21日 预合并成功(commit_id: 0dbc1a974311449b16bfbf29bd1baab23eab71f6)
jixiangjixiang
7月21日 强制推送  1 个提交:0dc9d203-Fix CVE-2025-12060
jixiangjixiang
7月21日 预合并成功(commit_id: c43abed99f7b9be6a9f1d0b653b102ad4b631e7d)
openeuler-ci-botopeneuler-ci-bot成员
7月21日 删除了label:openeuler-cla/yes
openeuler-ci-botopeneuler-ci-bot成员
7月21日 添加了label:openeuler-cla/yes
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

CLA Signature Pass

gca_u2301_82052726, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/src-openeuler/trigger/python-Keras/20/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 删除了label:ci_failed
openeuler-ci-botopeneuler-ci-bot成员
7月21日 添加了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

aarch64架构构建及构建后检查:multiarch/src-openeuler/aarch64/python-Keras/20/console

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

x86_64架构构建及构建后检查:multiarch/src-openeuler/x86-64/python-Keras/20/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 删除了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:
Check Name Build Result 详情 Build Details
check_binary_file ✅SUCCESS #20
check_lfsconfig :ballot_box_with_check:EXCLUDE
check_package_yaml_file ✅SUCCESS
check_repo_in_maintain ✅SUCCESS
check_consistency ✅SUCCESS
check_spec_file ✅SUCCESS
x86_64 check_build ✅SUCCESS #20
check_install ✅SUCCESS
check_license ✅SUCCESS
aarch64 check_build ✅SUCCESS #20
check_install ✅SUCCESS
check_license ✅SUCCESS
likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月21日 添加了label:ci_successful
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:

如下为接口变更检查结果,目标分支为openEuler-24.03-LTS-SP1,请PR提交者check差异信息

Arch Name Check Items Rpm Name Check Result Build Details
compare_package(x86_64) add_rpms ✅SUCCESS #20
delete_rpms ✅SUCCESS
rpm_files ✅SUCCESS
rpm_provides ✅SUCCESS
rpm_requires ✅SUCCESS
compare_package(aarch64) add_rpms ✅SUCCESS #20
delete_rpms ✅SUCCESS
rpm_files ✅SUCCESS
rpm_provides ✅SUCCESS
rpm_requires ✅SUCCESS
likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月21日 评论:
likedislike
yixiangzhike
7月23日 评论:

@gca_u2301_82052726 麻烦解决下冲突问题。

likedislike
yixiangzhike7月23日进行代码检视1
backport-Fix-CVE-2025-12060.patch
@@ -142,0 +188,0 @@
188+ 
189+-def _filter_safe_paths(members):
190++def filter_safe_zipinfos(members):
191+ base_dir = _resolve_path(".")
yixiangzhike7月23日评论:

此处base_dir = _resolve_path(".")涉及CVE-2026-11816问题,已在CVE-2026-11816补丁中变更,需要重新适配

likedislike
yixiangzhike7月23日进行代码检视1
backport-Fix-CVE-2025-12060.patch
@@ -142,0 +188,0 @@
188++
189++
190++def filter_safe_tarinfos(members):
191++ base_dir = _resolve_path(".")
yixiangzhike7月23日评论:

此处base_dir = _resolve_path(".")可能涉及CVE-2026-11816问题,需要参考CVE-2026-11816补丁重新适配

likedislike