Skip to content

Revert to b01dc82 baseline and backport CVE-2026-47766 fix#4

Merged
Zeno-sole merged 2 commits into
masterfrom
revert-to-b01dc82
Jul 23, 2026
Merged

Revert to b01dc82 baseline and backport CVE-2026-47766 fix#4
Zeno-sole merged 2 commits into
masterfrom
revert-to-b01dc82

Conversation

@Zeno-sole

@Zeno-sole Zeno-sole commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR reverts the repository to the b01dc82 baseline (1.14.4-1) and then backports the CVE-2026-47766 fix on top of it.

Changes

1. Revert to b01dc82 state

Reverts all commits after b01dc8251e983b3f7f7b5d6f7135717dc03ad421:

  • e814bed fix(cve): CVE-2026-47766
  • 14e5c02 feat: update crun to 1.21-1

2. Backport CVE-2026-47766 fix (new commit)

  • Patch content unchanged: Added debian/patches/CVE-2026-47766.patch (identical to the original from e814bed)
  • Series created: Added debian/patches/series with CVE-2026-47766.patch
  • Changelog updated: New entry 1.14.4-1deepin1 using dch, following RFC-0012 versioning

CVE Details

  • CVE: CVE-2026-47766
  • Component: rootfs /dev symlink handling (src/libcrun/linux.c, src/libcrun/handlers/krun.c)
  • Issue: rootfs-controlled /dev symlinks could redirect device setup outside the container rootfs
  • Fix: Use safe_openat instead of openat for /dev access
  • Origin: upstream, containers/crun@c6f338a

Version

1.14.4-11.14.4-1deepin1 (RFC-0012 compliant)

This reverts the following commits, restoring the tree to
b01dc82:

  - e814bed fix(cve): CVE-2026-47766
  - 14e5c02 feat: update crun to 1.21-1
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

TAG Bot

TAG: 1.14.4-1deepin1
EXISTED: no
DISTRIBUTION: unstable

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from zeno-sole. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Zeno-sole Zeno-sole changed the title Revert to b01dc82 state (revert 1.21-1 upgrade and CVE-2026-47766 fix) Revert to b01dc82 baseline and backport CVE-2026-47766 fix Jul 23, 2026
@Zeno-sole

Copy link
Copy Markdown
Contributor Author

/integrate

@github-actions

Copy link
Copy Markdown

AutoIntegrationPr Bot
auto integrate with pr url: deepin-community/Repository-Integration#4388
PrNumber: 4388
PrBranch: auto-integration-30001752542

@Zeno-sole

Copy link
Copy Markdown
Contributor Author

/integrate

Open rootfs /dev with safe_openat before creating default devices or
handler-specific devices. This keeps rootfs-controlled /dev symlinks
from redirecting device setup outside the container rootfs.
Replace openat calls with safe_openat in create_missing_devs (linux.c)
and libkrun_configure_container (handlers/krun.c) to validate the path
and prevent symlink-based escapes.

The patch is adapted for the 1.14.4 codebase: 1.14.4 uses O_RDONLY
flags (1.21 uses O_PATH) and safe_openat requires an extra rootfs_len
parameter (7 args vs 6 in 1.21).

CVE: CVE-2026-47766
Origin: upstream, containers/crun@c6f338a

Log: Fix CVE-2026-47766 by using safe_openat for rootfs /dev access

Influence:
1. Verify container device creation works correctly with normal rootfs /dev
2. Test that rootfs /dev symlinks cannot redirect device setup outside rootfs
3. Validate krun handler container startup with /dev symlinks
4. Check no regression in default device population for containers
5. Run test_dev_symlink_does_not_populate_outside_rootfs test case

fix: 修复 CVE-2026-47766 不跟随 rootfs /dev 符号链接

在创建默认设备或处理器特定设备之前,使用 safe_openat 打开 rootfs /dev。
这可以防止 rootfs 控制的 /dev 符号链接将设备设置重定向到容器 rootfs 之外。
在 create_missing_devs (linux.c) 和 libkrun_configure_container (handlers/krun.c)
中将 openat 调用替换为 safe_openat,以验证路径并防止基于符号链接的逃逸。

patch 已适配 1.14.4 代码库:1.14.4 使用 O_RDONLY 标志(1.21 使用 O_PATH),
且 safe_openat 需要额外的 rootfs_len 参数(7 个参数,1.21 为 6 个)。

Log: 修复 CVE-2026-47766,使用 safe_openat 访问 rootfs /dev 防止符号链接逃逸

Influence:
1. 验证正常 rootfs /dev 下容器设备创建正常工作
2. 测试 rootfs /dev 符号链接无法将设备设置重定向到 rootfs 之外
3. 验证 krun 处理器在 /dev 符号链接下的容器启动
4. 检查容器默认设备填充无回归
5. 运行 test_dev_symlink_does_not_populate_outside_rootfs 测试用例

repo: crun #master
@Zeno-sole
Zeno-sole force-pushed the revert-to-b01dc82 branch from a29a51d to 0cfad39 Compare July 23, 2026 11:26
@Zeno-sole

Copy link
Copy Markdown
Contributor Author

/integrate

@Zeno-sole
Zeno-sole merged commit a04ac68 into master Jul 23, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants