]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
apparmorfs: fix use-after-free on symlink traversal
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 10 Apr 2019 18:04:34 +0000 (14:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:22:25 +0000 (18:22 +0200)
commitfa42fde1f8e6da596de8e0bb1e353bc8ce000bc2
treefcd7d6c1d658fc6253a3dc2258e10a15e1e30e7b
parentcf0259f7662a84b20ac3a71b9e1cc9e918e9a244
apparmorfs: fix use-after-free on symlink traversal

[ Upstream commit f51dcd0f621caac5380ce90fbbeafc32ce4517ae ]

symlink body shouldn't be freed without an RCU delay.  Switch apparmorfs
to ->destroy_inode() and use of call_rcu(); free both the inode and symlink
body in the callback.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/apparmor/apparmorfs.c