Owned by Canonical Kernel
Get this repository:
git clone https://git.not.enabled/~canonical-kernel/ubuntu/+source/linux-aws/+git/eoan
Members of Canonical Kernel can upload to this repository. Log in for directions.


Name Last Modified Last Commit
master 2020-07-17 17:16:02 UTC
UBUNTU: SAUCE: overlayfs: internal getxattr operations without sepolicy checking

Author: Mark Salyzyn
Author Date: 2020-07-09 18:14:42 UTC

UBUNTU: SAUCE: overlayfs: internal getxattr operations without sepolicy checking

BugLink: https://bugs.launchpad.net/bugs/1864669

Check impure, opaque, origin & meta xattr with no sepolicy audit
(using __vfs_getxattr) since these operations are internal to
overlayfs operations and do not disclose any data. This became
an issue for credential override off since sys_admin would have
been required by the caller; whereas would have been inherently
present for the creator since it performed the mount.

This is a change in operations since we do not check in the new
ovl_do_vfs_getxattr function if the credential override is off or
not. Reasoning is that the sepolicy check is unnecessary overhead,
especially since the check can be expensive.

Because for override credentials off, this affects _everyone_ that
underneath performs private xattr calls without the appropriate
sepolicy permissions and sys_admin capability. Providing blanket
support for sys_admin would be bad for all possible callers.

For the override credentials on, this will affect only the mounter,
should it lack sepolicy permissions. Not considered a security
problem since mounting by definition has sys_admin capabilities,
but sepolicy contexts would still need to be crafted.

It should be noted that there is precedence, __vfs_getxattr is used
in other filesystems for their own internal trusted xattr management.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: linux-unionfs@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com
Cc: linux-security-module@vger.kernel.org

v15 - revert to v13 as xattr_gs_args was rejected.
    - move ovl_do_wrapper from util.c to inline in overlayfs.h

v14 - rebase to use xattr_gs_args.

v13 - rebase to use __vfs_getxattr flags option

v12 - rebase

v11 - switch name to ovl_do_vfs_getxattr, fortify comment

v10 - added to patch series

[Based on v15: https://lore.kernel.org/patchwork/patch/1148514/]
[marcelo.cerri@canonical.com: Adjusted __vfs_getxattr() args and
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>

11 of 1 result
This repository contains Public information 
Everyone can see this information.