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)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 10 Apr 2019 18:04:34 +0000 (14:04 -0400)
commitf51dcd0f621caac5380ce90fbbeafc32ce4517ae
tree294cee0590e9e27a93bc9fd6122c50b78da44b99
parent46c874419652bbefdfed17420fd6e88d8a31d9ec
apparmorfs: fix use-after-free on symlink traversal

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>
security/apparmor/apparmorfs.c