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/overlay2
Akihiro Suda 11ef8d3ba9
overlay2: support "userxattr" option (kernel 5.11)
The "userxattr" option is needed for mounting overlayfs inside a user namespace with kernel >= 5.11.

The "userxattr" option is NOT needed for the initial user namespace (aka "the host").

Also, Ubuntu (since circa 2015) and Debian (since 10) with kernel < 5.11 can mount the overlayfs in a user namespace without the "userxattr" option.

The corresponding kernel commit: 2d2f2d7322ff43e0fe92bf8cccdc0b09449bf2e1
> **ovl: user xattr**
>
> Optionally allow using "user.overlay." namespace instead of "trusted.overlay."
> ...
> Disable redirect_dir and metacopy options, because these would allow privilege escalation through direct manipulation of the
> "user.overlay.redirect" or "user.overlay.metacopy" xattrs.

Fix issue 42055

Related to containerd/containerd PR 5076

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-03-11 15:12:41 +09:00
..
check.go overlay: move supportsMultipleLowerDir to utils 2019-11-08 11:48:47 -08:00
mount.go daemon/graphdriver: normalize comment formatting 2019-11-27 15:43:23 +01:00
overlay.go overlay2: support "userxattr" option (kernel 5.11) 2021-03-11 15:12:41 +09:00
overlay_test.go Update overlay2 to use naive diff for changes 2018-06-20 11:07:36 -07:00
overlay_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00