Article View: linux.debian.bugs.dist
Article #4315Bug#1153869: docker.io: docker cp fails with "path escapes from parent" (regression, upstream patch)
From: David R. Hedges
Date: Thu, 12 Nov 2026 23:10
Date: Thu, 12 Nov 2026 23:10
119 lines
6358 bytes
6358 bytes
Package: docker.io
Version: 28.5.2+dfsg4-5
Severity: important
Tags: fixed-upstream
Dear Maintainer,
Since the CVE-2026-41568/CVE-2026-42306 backport in 28.5.2+dfsg4-3,
"docker cp" fails for any container that has a volume or bind mount
whose destination path goes through an absolute symlink inside the
container. The most common such symlink is /var/run -> /run, which
Debian and Ubuntu base images ship, so for example every container that
bind-mounts /var/run/docker.sock is affected.
Minimal reproducer (debian:trixie-slim has /var/run -> /run):
docker run -d --name t1 -v t1vol:/var/run/demo debian:trixie-slim sleep infinity
docker cp t1:/etc/debian_version -
Expected result: a tar stream containing debian_version.
Actual result:
Error response from daemon: mkdirat var/run/demo: path escapes from parent
With the same daemon:
- A container that was created but never started fails the same way.
- Copying into the container ("docker cp somefile t1:/tmp/") fails with
the client message "no such directory". dockerd logs the real error:
Handler for HEAD /v1.51/containers/t1/archive returned error: mkdirat var/run/demo: path escapes from parent
- A bind-mounted Docker socket fails too:
docker run -d --name t4 -v /var/run/docker.sock:/var/run/docker.sock debian:trixie-slim sleep infinity
docker cp t4:/etc/debian_version -
Error response from daemon: mkdirat var/run: statat var/run: path escapes from parent
- The same container with its volume at /srv/demo instead works.
I tested with docker.io and docker-cli 28.5.2+dfsg4-5 from testing
(overlay2 storage driver) and first saw the failure with
28.5.2+dfsg4-4. Upstream Docker 29.7.2 runs every case above without
error. So does trixie's 26.1.5+dfsg1-9+deb13u1, which has the same CVE
fixes from DSA-6443-1, so stable does not appear to be affected.
Cause: debian/patches/CVE-2026-42306.patch, which backports the fixes
for CVE-2026-41568 (GHSA-vp62-88p7-qqf5) and CVE-2026-42306
(GHSA-rg2x-37c3-w2rh), makes openContainerFS() in
engine/daemon/containerfs_linux.go create and open each mount
destination through Go's os.Root (root.MkdirAll() / root.Open() on the
destination relative to BaseFS). os.Root refuses to follow absolute
symlinks, so a destination below one fails with "path escapes from
parent".
Upstream hit the same regression in Docker Engine 29.5.1
(https://github.com/moby/moby/issues/52653) and fixed it in 29.5.2:
https://github.com/moby/moby/pull/52655
commit fb3702d033601bb0e767f2ca398e3909a15be29c
"daemon: resolve in-container symlinks before os.Root mount ops"
That commit resolves the destination with ctr.GetResourcePath() before
the os.Root calls. It is not in debian/patches as of 28.5.2+dfsg4-5.
Please consider backporting it on top of CVE-2026-42306.patch.
I first hit this in a CI job that runs "docker compose cp" against a
Tomcat image in which /usr/local/tomcat is an absolute symlink to
/usr/share/tomcat-11, with a volume mounted under
/usr/local/tomcat/webapps/. The job failed with:
Error response from daemon: mkdirat usr/local/tomcat/webapps/ROOT/foo: path escapes from parent
Thanks!
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 7.1.13+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages docker.io depends on:
ii containerd 2.1.9+ds1-5
ii debconf [debconf-2.0] 1.5.92
ii iptables 1.8.13-1
ii libc6 2.43-7
ii libsystemd0 262-1
ii runc 1.3.6+ds1-1
ii systemd [systemd-sysusers] 262-1
ii sysvinit-utils 3.18-1
ii tini-static 0.19.0-6+b3
Versions of packages docker.io recommends:
ii apparmor 4.1.8-3+b1
ii ca-certificates 20260816+nmu1
ii dbus-user-session 1.16.2-8
ii docker-cli 28.5.2+dfsg4-5
ii git 1:2.53.0-1
ii needrestart 3.11-1
ii xz-utils 5.8.4-1
Versions of packages docker.io suggests:
pn btrfs-progs <none>
pn debootstrap <none>
pn docker-doc <none>
ii e2fsprogs 1.47.4-1+b3
pn rinse <none>
pn rootlesskit <none>
pn xfsprogs <none>
pn zfs-fuse | zfsutils-linux <none>
-- debconf information excluded
Technical Details
Message-ID:
<NYM5z-bvVF-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: "David R. Hedges" <debian963@thelittleman.net> Newsgroups: linux.debian.bugs.dist Subject: Bug#1153869: docker.io: docker cp fails with "path escapes from parent" (regression, upstream patch) Date: Fri, 13 Nov 2026 00:10:01 +0100 Message-ID: <NYM5z-bvVF-7@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Thu Nov 12 23:05:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.45 Reply-To: "David R. Hedges" <debian963@thelittleman.net>, 1153869@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+pkg-go@tracker.debian.org X-Debian-Pr-Message: report 1153869 X-Debian-Pr-Package: docker.io X-Debian-Pr-Keywords: fixed-upstream X-Debian-Pr-Source: docker.io Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: reportbug 13.2.0+nmu1 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002309 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 119 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 12 Nov 2026 23:02:32 +0000 X-Original-Message-ID: <179452455286.2932543.8458250070902090029.reportbug@dhz240.bio-key.local>