kernel-fxtec-pro1x/security
John Johansen f3248d6dce apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock
commit 8c62ed27a12c00e3db1c9f04bc0f272bdbb06734 upstream.

aa_xattrs_match() is unfortunately calling vfs_getxattr_alloc() from a
context protected by an rcu_read_lock. This can not be done as
vfs_getxattr_alloc() may sleep regardles of the gfp_t value being
passed to it.

Fix this by breaking the rcu_read_lock on the policy search when the
xattr match feature is requested and restarting the search if a policy
changes occur.

Fixes: 8e51f9087f ("apparmor: Add support for attaching profiles via xattr, presence and value")
Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-09 10:19:02 +01:00
..
apparmor apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock 2020-01-09 10:19:02 +01:00
integrity ima: fix freeing ongoing ahash_request 2019-10-11 18:21:11 +02:00
keys keys: Fix missing null pointer check in request_key_auth_describe() 2019-09-21 07:17:13 +02:00
loadpin
selinux selinux: fix memory leak in policydb_init() 2019-08-06 19:06:54 +02:00
smack smack: use GFP_NOFS while holding inode_smack::smk_lock 2019-10-07 18:57:27 +02:00
tomoyo
yama
commoncap.c
device_cgroup.c
inode.c securityfs: fix use-after-free on symlink traversal 2019-05-25 18:23:42 +02:00
Kconfig
lsm_audit.c
Makefile
min_addr.c
security.c