From 8ac1545200d26b0e157a5505ea7c07b7c32cb237 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Wed, 4 Sep 2019 08:54:29 +0100 Subject: [PATCH] Disable privileged tests for cve-2018-15664 Gbp-Pq: Name cve-2018-15664-03-debian-skip-privileged-tests.patch --- engine/pkg/chrootarchive/archive_unix_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/pkg/chrootarchive/archive_unix_test.go b/engine/pkg/chrootarchive/archive_unix_test.go index f39a88ad..161be05f 100644 --- a/engine/pkg/chrootarchive/archive_unix_test.go +++ b/engine/pkg/chrootarchive/archive_unix_test.go @@ -16,6 +16,7 @@ import ( "github.com/docker/docker/pkg/archive" "golang.org/x/sys/unix" "gotest.tools/assert" + "gotest.tools/skip" ) // Test for CVE-2018-15664 @@ -23,6 +24,7 @@ import ( // some path outside of a container's rootfs that we do not copy data to a // container path that will actually overwrite data on the host func TestUntarWithMaliciousSymlinks(t *testing.T) { + skip.If(t, os.Getuid() != 0, "DM - skipping privileged test") dir, err := ioutil.TempDir("", t.Name()) assert.NilError(t, err) defer os.RemoveAll(dir) @@ -84,6 +86,7 @@ func TestUntarWithMaliciousSymlinks(t *testing.T) { // some path outside of a container's rootfs that we do not unwittingly leak // host data into the archive. func TestTarWithMaliciousSymlinks(t *testing.T) { + skip.If(t, os.Getuid() != 0, "DM - skipping privileged test") dir, err := ioutil.TempDir("", t.Name()) assert.NilError(t, err) // defer os.RemoveAll(dir) -- 2.30.2