Skip to content

[20.10 backport] overlay2: support "userxattr" option (kernel 5.11)#42168

Merged
AkihiroSuda merged 2 commits intomoby:20.10from
AkihiroSuda:ovl-k511-2010
Mar 20, 2021
Merged

[20.10 backport] overlay2: support "userxattr" option (kernel 5.11)#42168
AkihiroSuda merged 2 commits intomoby:20.10from
AkihiroSuda:ovl-k511-2010

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda commented Mar 18, 2021

Cherry-pick #42068

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 <[email protected]>
(cherry picked from commit 11ef8d3)
Signed-off-by: Akihiro Suda <[email protected]>
Signed-off-by: Akihiro Suda <[email protected]>
(cherry picked from commit a8008f7)
Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda changed the title Ovl k511 2010 [20.10 backport] overlay2: support "userxattr" option (kernel 5.11) Mar 18, 2021
@AkihiroSuda AkihiroSuda added this to the 20.10.6 milestone Mar 18, 2021
@thaJeztah
Copy link
Copy Markdown
Member

looks like its failing; could it be it needs #42147 ?

@thaJeztah
Copy link
Copy Markdown
Member

Can you try rebasing?

@thaJeztah
Copy link
Copy Markdown
Member

Looks like this test is sometimes flaky; this is on arm64; https://ci-next.docker.com/public/blue/rest/organizations/jenkins/pipelines/moby/branches/PR-42168/runs/2/nodes/273/log/?start=0

 === FAIL: daemon/logger TestCopierWithSized/With_RingLogger (0.00s)
     --- FAIL: TestCopierWithSized/With_RingLogger (0.00s)
         copier_test.go:271: Line was not of expected max length 32768, was 34304

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@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

@AkihiroSuda AkihiroSuda merged commit cdb77ec into moby:20.10 Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants