Skip to content

[HIGH] Patch docker-cli for CVE-2026-17106 - #18659

Open
v-swapsahu wants to merge 2 commits into
microsoft:fasttrack/3.0from
Kanishk-Bansal:topic/docker-cli/3.0/CVE-2026-17106
Open

[HIGH] Patch docker-cli for CVE-2026-17106 #18659
v-swapsahu wants to merge 2 commits into
microsoft:fasttrack/3.0from
Kanishk-Bansal:topic/docker-cli/3.0/CVE-2026-17106

Conversation

@v-swapsahu

@v-swapsahu v-swapsahu commented Aug 31, 2026

Copy link
Copy Markdown
Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Patch docker-cli for CVE-2026-17106

Change Log
  • SPECS/docker-cli/CVE-2026-17106.patch
  • SPECS/docker-cli/docker-cli.spec
Does this affect the toolchain?

NO

Associated issues
  • #xxxx
Links to CVEs
Test Methodology
  • Local Build
image
  • Patch application during build
image
  • Verification is done via a standalone POC
    A) WITH patch (current HEAD) — expect PASS
image

Expected: --- PASS for SymlinkBreakout, RejectsRelativeEscapeBeforeAbsoluteSymlink, HardlinkThroughAbsoluteSymlink → ok.

B) WITHOUT patch (vulnerable) — expect FAIL

image

How the PoC works:

the tar defines inner/go_up → .. and inner/go_up/escape → ../victim, then writes inner/go_up/escape/newfile.

  • Unpatched extraction follows those archive-created symlinks and lands newfile in the sibling victim/ (outside dest).
  • Patched code resolves intermediate components inside an os.Root, so the write stays confined (or is rejected).

@v-swapsahu
v-swapsahu requested a review from a team as a code owner August 31, 2026 12:53
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@v-swapsahu
v-swapsahu marked this pull request as draft August 31, 2026 12:53
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging fasttrack/3.0 PRs Destined for Azure Linux 3.0 labels Aug 31, 2026
@v-swapsahu v-swapsahu changed the title Patch docker-cli for CVE-2026-17106 [HIGH] [HIGH] Patch docker-cli for CVE-2026-17106 Aug 31, 2026
@v-swapsahu

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

@v-swapsahu

v-swapsahu commented Sep 1, 2026

Copy link
Copy Markdown
Author

Patch Analysis:
CVE-2026-17106: "CopyEscape" — tar-extraction symlink/hardlink path traversal

Backported: Yes

  • Backport of moby/go-archive v0.3.1→v0.3.2 onto vendored github.com/docker/docker/pkg/archive. Replaces string checks with os.Root + resolveArchivePath (in-root intermediate-symlink resolution, final component preserved) + resolveHardlinkTarget/root.Link, and rejects non-local names via filepath.IsLocal. New rootpath.go (fsRootPath, forked from containerd/continuity) provides chroot-like resolution.

  • Squashes 3 upstream commits: df55fdf3 (core hardening), 9e6d2c7c (absolute-symlink resolve-in-root), 4f6cd58f (hardlink through absolute symlink).

  • sync.OnceValues is a generic (Go 1.21+); the man/go.mod manpages build is pinned to go1.16 and can't instantiate generics. Replaced by a plain memoized closure — three locals (absPathVal, absPathErr, absPathDone) with an absPath() func

  • pathpkg "path": The path package is imported under the alias pathpkg to avoid colliding with the many local path variables in the extraction code.

Files NOT backported — and why

  • copy.go, copy_test.go (RebaseArchiveEntries, upstream 8829a251/1c23372e)
    Non-security docker cp path-rebasing correctness change. Explicitly out of scope; stated in the patch header.

  • Upstream test files (archive_test.go, archive_unix_test.go, utils_test.go, chrootarchive/...)
    Test scaffolding not carried into the vendored tree; package has no %check, so no test ships in the patch.

  • time_* files (time.go/time_nonwindows.go/time_windows.go)
    Not needed. The existing time_linux.go / time_unsupported.go are kept unchanged; timestamps are handled inline through os.Root in archive.go/diff.go.

Verification
Local build passes. PoC: passes with patch, fails without patch.

Correctly scoped backport of the upstream containment fix; only the non-security RebaseArchiveEntries change and test files are omitted. No toolchain/build changes required on Azure Linux 3.0.

Pipelines - Run PR-18659+docker-cli+unknown has been triggered and it has passed.

Patch Application:

image

@v-swapsahu
v-swapsahu marked this pull request as ready for review September 2, 2026 03:52
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fasttrack/3.0 PRs Destined for Azure Linux 3.0 Packaging security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants