moby/daemon/graphdriver
Brian Goff 03f1c3d78f
Lock down docker root dir perms.
Do not use 0701 perms.
0701 dir perms allows anyone to traverse the docker dir.
It happens to allow any user to execute, as an example, suid binaries
from image rootfs dirs because it allows traversal AND critically
container users need to be able to do execute things.

0701 on lower directories also happens to allow any user to modify
     things in, for instance, the overlay upper dir which neccessarily
     has 0755 permissions.

This changes to use 0710 which allows users in the group to traverse.
In userns mode the UID owner is (real) root and the GID is the remapped
root's GID.

This prevents anyone but the remapped root to traverse our directories
(which is required for userns with runc).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ef7237442147441a7cadcda0600be1186d81ac73)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 93ac040bf0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-05 09:57:00 +02:00
..
aufs Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
btrfs Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
copy refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
devmapper refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
fuse-overlayfs Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
graphtest refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
overlay Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
overlay2 Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
overlayutils refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
register Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
vfs Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
windows refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
zfs Lock down docker root dir perms. 2021-10-05 09:57:00 +02:00
counter.go graphdriver: Fix RefCounter memory leak 2018-02-09 10:26:06 +08:00
driver.go daemon/graphdriver: normalize comment formatting 2019-11-27 15:43:23 +01:00
driver_freebsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
driver_linux.go storage-driver: promote overlay2, make Btrfs and ZFS opt-in 2021-07-21 14:53:56 +02:00
driver_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
driver_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
driver_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
fsdiff.go Add layer id to NaiveDiffDriver untar timing log 2018-10-05 16:28:40 -07:00
plugin.go goimports: fix imports 2019-09-18 12:56:54 +02:00
proxy.go Move plugin client creation to the extension point 2018-05-25 15:18:53 -04:00