]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
UBUNTU: SAUCE: overlayfs: Skip permission checking for trusted.overlayfs.* xattrs
authorSeth Forshee <seth.forshee@canonical.com>
Tue, 19 Jan 2016 19:12:02 +0000 (13:12 -0600)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:41 +0000 (08:24 +0100)
commit3fb38c98e060b327cb58373775dcc95ed52d1f22
tree9aaab9ee59e8d0bd3c844660e023a577909fd290
parent1197134c26fa38531c4521dce999cae96875bcef
UBUNTU: SAUCE: overlayfs: Skip permission checking for trusted.overlayfs.* xattrs

The original mounter had CAP_SYS_ADMIN in the user namespace
where the mount happened, and the vfs has validated that the user
has permission to do the requested operation. This is sufficient
for allowing the kernel to write these specific xattrs, so we can
bypass the permission checks for these xattrs.

To support this, export __vfs_setxattr_noperm and add an similar
__vfs_removexattr_noperm which is also exported. Use these when
setting or removing trusted.overlayfs.* xattrs.

BugLink: http://bugs.launchpad.net/bugs/1531747
BugLink: http://bugs.launchpad.net/bugs/1534961
BugLink: http://bugs.launchpad.net/bugs/1535150
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/overlayfs/overlayfs.h
fs/xattr.c
include/linux/xattr.h