diff options
author | Andreas Gruenbacher | 2018-11-26 18:45:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-01-13 09:51:07 +0100 |
commit | 310486107d4105ceb0a1f7884074ff0da32e7d1c (patch) | |
tree | fd1f9ded2b331bb88e979f38de48212c998ac062 /security/selinux/ss | |
parent | dlm: memory leaks on error path in dlm_user_request() (diff) | |
download | kernel-qcow2-linux-310486107d4105ceb0a1f7884074ff0da32e7d1c.tar.gz kernel-qcow2-linux-310486107d4105ceb0a1f7884074ff0da32e7d1c.tar.xz kernel-qcow2-linux-310486107d4105ceb0a1f7884074ff0da32e7d1c.zip |
gfs2: Get rid of potential double-freeing in gfs2_create_inode
commit 6ff9b09e00a441599f3aacdf577254455a048bc9 upstream.
In gfs2_create_inode, after setting and releasing the acl / default_acl, the
acl / default_acl pointers are not set to NULL as they should be. In that
state, when the function reaches label fail_free_acls, gfs2_create_inode will
try to release the same acls again.
Fix that by setting the pointers to NULL after releasing the acls. Slightly
simplify the logic. Also, posix_acl_release checks for NULL already, so
there is no need to duplicate those checks here.
Fixes: e01580bf9e4d ("gfs2: use generic posix ACL infrastructure")
Reported-by: Pan Bian <bianpan2016@163.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/selinux/ss')
0 files changed, 0 insertions, 0 deletions