]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix use-after-free on ictx in list_descendants()
authorWang ShuaiChao <wangshuaich@chinatelecom.cn>
Tue, 7 Sep 2021 08:43:11 +0000 (16:43 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 13 Feb 2022 16:03:26 +0000 (17:03 +0100)
commit5803efde47e3dd0b9c0edefd1828bb8ca5f57c67
treeecb170309fbeecf7a151553b1b9987c6848ec159
parent91f471b19a8436443eb4f75ebb3d4414ee623c6e
librbd: fix use-after-free on ictx in list_descendants()

Ictx is deleted when "ictx->state->open()" and "ictx->state->close()"
fail, and then "lderr(ictx->cct)" crashes.

Fixes: https://tracker.ceph.com/issues/52522
Signed-off-by: Wang ShuaiChao <wangshuaich@chinatelecom.cn>
(cherry picked from commit fa5d61ee5144f67cba53d54d36013614183e53a3)
src/librbd/api/Image.cc