1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/graphdriver/vfs
Brian Goff 93ac040bf0 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>
2021-08-19 20:40:15 +00:00
..
copy_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
copy_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
driver.go Lock down docker root dir perms. 2021-08-19 20:40:15 +00:00
quota_linux.go quota: move quota package out of graphdriver 2020-10-05 13:28:25 +00:00
quota_unsupported.go quota: move quota package out of graphdriver 2020-10-05 13:28:25 +00:00
vfs_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00