Mark Salyzyn 3fe1e271c7 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:30:34 +02:00
..
2016-10-15 12:09:13 -07:00
2019-08-06 18:29:38 +02:00
2019-08-04 09:33:32 +02:00
2019-05-31 06:48:13 -07:00
2018-12-17 09:38:35 +01:00
2017-11-30 08:39:04 +00:00
2019-03-13 14:04:52 -07:00
2019-09-21 07:14:16 +02:00
2018-12-21 14:11:31 +01:00
2016-09-27 21:20:53 -04:00
2018-02-17 13:21:15 +01:00
2017-06-14 15:06:01 +02:00