From: Casey Bodley Date: Wed, 13 Sep 2023 20:30:03 +0000 (-0400) Subject: rgw/crypt: don't deref null manifest_bl X-Git-Tag: v19.0.0~441^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F53448%2Fhead;p=ceph.git rgw/crypt: don't deref null manifest_bl with dbstore, the manifest_bl pointer was null; check for null before dereferencing for read_manifest_parts() Fixes: https://tracker.ceph.com/issues/62378 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 76876faeaea2..edab12ec4275 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -589,7 +589,7 @@ send_data: int RGWGetObj_ObjStore_S3::get_decrypt_filter(std::unique_ptr *filter, RGWGetObj_Filter* cb, bufferlist* manifest_bl) { - if (skip_decrypt || !manifest_bl) { // bypass decryption for multisite sync requests + if (skip_decrypt) { // bypass decryption for multisite sync requests return 0; } @@ -616,7 +616,7 @@ int RGWGetObj_ObjStore_S3::get_decrypt_filter(std::unique_ptr ldpp_dout(this, 1) << "failed to decode RGW_ATTR_CRYPT_PARTS" << dendl; return -EIO; } - } else { + } else if (manifest_bl) { // otherwise, we read the part lengths from the manifest res = RGWGetObj_BlockDecrypt::read_manifest_parts(this, *manifest_bl, parts_len); @@ -2789,7 +2789,7 @@ int RGWPutObj_ObjStore_S3::get_decrypt_filter( ldpp_dout(this, 1) << "failed to decode RGW_ATTR_CRYPT_PARTS" << dendl; return -EIO; } - } else { + } else if (manifest_bl) { // otherwise, we read the part lengths from the manifest res = RGWGetObj_BlockDecrypt::read_manifest_parts(this, *manifest_bl, parts_len);