linux-stable/fs/overlayfs
Mark Salyzyn 3fe1e271c7 ovl: filter of trusted xattr results in audit
commit 5c2e9f346b 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: a082c6f680 ("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:30:34 +02:00
..
copy_up.c ovl: fsync after copy-up 2016-10-31 14:42:14 +01:00
dir.c ovl: persistent inode numbers for upper hardlinks 2018-04-13 19:47:50 +02:00
inode.c ovl: filter of trusted xattr results in audit 2019-10-05 12:30:34 +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 fs: rename "rename2" i_op to "rename" 2016-09-27 11:03:58 +02:00
readdir.c ovl: fix failure to fsync lower dir 2018-02-17 13:21:20 +01:00
super.c ovl: fix random return value on mount 2017-07-27 15:08:07 -07:00