android_kernel_oneplus_msm8998/fs/overlayfs
Mark Salyzyn 05f4bc30f5 ovl: filter of trusted xattr results in audit
commit 5c2e9f346b815841f9bed6029ebcb06415caf640 upstream.

When filtering xattr list for reading, presence of trusted xattr
results in a security audit log.  However, if there is other content
no errno will be set, and if there isn't, the errno will be -ENODATA
and not -EPERM as is usually associated with a lack of capability.
The check does not block the request to list the xattrs present.

Switch to ns_capable_noaudit to reflect a more appropriate check.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: linux-security-module@vger.kernel.org
Cc: kernel-team@android.com
Cc: stable@vger.kernel.org # v3.18+
Fixes: a082c6f680da ("ovl: filter trusted xattr for non-admin")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-05 12:27:56 +02:00
..
copy_up.c ovl: override creds with the ones from the superblock mounter 2018-09-15 09:40:41 +02:00
dir.c ovl: fix uid/gid when creating over whiteout 2019-04-27 09:33:59 +02:00
inode.c ovl: filter of trusted xattr results in audit 2019-10-05 12:27:56 +02:00
Kconfig ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
Makefile ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
overlayfs.h ovl: proper cleanup of workdir 2018-09-15 09:40:41 +02:00
readdir.c ovl: proper cleanup of workdir 2018-09-15 09:40:41 +02:00
super.c ovl: proper cleanup of workdir 2018-09-15 09:40:41 +02:00