Skip to content

Commit

Permalink
afs: Fix a use after free in afs_xattr_get_acl()
Browse files Browse the repository at this point in the history
[ Upstream commit 248c944 ]

The "op" pointer is freed earlier when we call afs_put_operation().

Fixes: e49c7b2 ("afs: Build an abstraction around an "operation" concept")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Nov 5, 2020
1 parent 620e696 commit e167e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/afs/xattr.c
Expand Up @@ -85,7 +85,7 @@ static int afs_xattr_get_acl(const struct xattr_handler *handler,
if (acl->size <= size)
memcpy(buffer, acl->data, acl->size);
else
op->error = -ERANGE;
ret = -ERANGE;
}
}

Expand Down

0 comments on commit e167e9c

Please sign in to comment.