]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ceph: fix use-after-free for fsc->mdsc
authorXiubo Li <xiubli@redhat.com>
Thu, 23 Jul 2020 07:32:25 +0000 (15:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:42:12 +0000 (11:42 +0200)
commit81b4dc15857f2cf57f5a585bd6b8f963e77704b8
tree9c01472016a4e5094724cf848e85964c28869e1a
parent5beb4cf09fbdf70ee040ec7551d509e260f6d4be
ceph: fix use-after-free for fsc->mdsc

[ Upstream commit a7caa88f8b72c136f9a401f498471b8a8e35370d ]

If the ceph_mdsc_init() fails, it will free the mdsc already.

Reported-by: syzbot+b57f46d8d6ea51960b8c@syzkaller.appspotmail.com
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/mds_client.c