Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Conversation

@thaJeztah
Copy link
Member

backport of moby#39292 for 19.03

This is useful for preventing CVE-2018-15664 where a malicious container
process can take advantage of a race on symlink resolution/sanitization.

Before this change chrootarchive would chroot to the destination
directory which is attacker controlled. With this patch we always chroot
to the container's root which is not attacker controlled.

replaces moby#39252

cpuguy83 added 2 commits June 3, 2019 18:55
This is useful for preventing CVE-2018-15664 where a malicious container
process can take advantage of a race on symlink resolution/sanitization.

Before this change chrootarchive would chroot to the destination
directory which is attacker controlled. With this patch we always chroot
to the container's root which is not attacker controlled.

Signed-off-by: Brian Goff <[email protected]>
(cherry picked from commit d089b63)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Previously only unpack operations were supported with chroot.
This adds chroot support for packing operations.
This prevents potential breakouts when copying data from a container.

Signed-off-by: Brian Goff <[email protected]>
(cherry picked from commit 3029e76)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 19.03.0 milestone Jun 3, 2019
@thaJeztah
Copy link
Member Author

ping @cpuguy83 @justincormack PTAL

Copy link

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once upstream is merged.

@thaJeztah
Copy link
Member Author

yes, opened in advance of that so that CI can run already; let me change to "WIP"

@thaJeztah thaJeztah changed the title [19.03 backport] Pass root to chroot to for chroot Tar/Untar (CVE-2018-15664) [WIP][19.03 backport] Pass root to chroot to for chroot Tar/Untar (CVE-2018-15664) Jun 3, 2019
@thaJeztah thaJeztah changed the title [WIP][19.03 backport] Pass root to chroot to for chroot Tar/Untar (CVE-2018-15664) [19.03 backport] Pass root to chroot to for chroot Tar/Untar (CVE-2018-15664) Jun 4, 2019
@thaJeztah
Copy link
Member Author

removed "WIP" as upstream was merged

Copy link

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on clean cherry-pick

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants