https://github.com/torvalds/linux
Revision 8c62ed27a12c00e3db1c9f04bc0f272bdbb06734 authored by John Johansen on 02 January 2020, 13:31:22 UTC, committed by John Johansen on 04 January 2020, 23:56:44 UTC
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: 8e51f9087f40 ("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>
1 parent 20d4e80
History
Tip revision: 8c62ed27a12c00e3db1c9f04bc0f272bdbb06734 authored by John Johansen on 02 January 2020, 13:31:22 UTC
apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock
Tip revision: 8c62ed2
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 15.0 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.7 KB
.mailmap -rw-r--r-- 14.1 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.3 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 526.7 KB
Makefile -rw-r--r-- 59.4 KB
README -rw-r--r-- 727 bytes

README

back to top