]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/rbd: don't produce info on errors in aio_mirror_image_get_info()
authorIlya Dryomov <idryomov@gmail.com>
Thu, 12 Oct 2023 17:03:10 +0000 (19:03 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 17 Oct 2023 11:40:25 +0000 (13:40 +0200)
commit0d32001b83002016fc5b3f411e5de4ff987fba10
tree3be11424732e866b6978a8d992c5ef8f997a6595
parent129959fe9d0ef9f0a81dc3637356e2bd1f39bfe8
pybind/rbd: don't produce info on errors in aio_mirror_image_get_info()

Check completion return value before attemting to decode c_info.
Otherwise we are guaranteed to access invalid memory in decode_cstr()
while trying to compute global_id string length when the client is
blocklisted for example.

Fixes: https://tracker.ceph.com/issues/63028
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit a81bd2db3af4d7b53736be8e42a3eaa53028d60c)
src/pybind/rbd/rbd.pyx