]> git.apps.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:45:27 +0000 (13:45 +0200)
commit2d19b0695ac08a6709bbc9c6afa6afd0c644fbe5
tree017a0ae805910f5938e15cc9e5032075494f0601
parentba5c4806bec2e1e5354ce91fe2a0a998bdce0b70
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