Skip to content

rgw/crypt: don't deref null manifest_bl - #53448

Merged
cbodley merged 1 commit into
ceph:mainfrom
cbodley:wip-62378
Sep 21, 2023
Merged

cbodley merged 1 commit into
ceph:mainfrom
cbodley:wip-62378

Conversation

@cbodley

@cbodley cbodley commented Sep 13, 2023 •

Copy link
Copy Markdown
Contributor

with dbstore, the RGW_ATTR_MANIFEST attribute didn't exist so the manifest_bl pointer was null; check for null before dereferencing for read_manifest_parts()

Fixes: https://tracker.ceph.com/issues/62378

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@cbodley
cbodley requested a review from a team as a code owner September 13, 2023 20:34
@github-actions github-actions Bot added the rgw label Sep 13, 2023
@mattbenjamin

Copy link
Copy Markdown
Contributor

@cbodley what backport branches could this affect?

@cbodley

cbodley commented Sep 14, 2023

Copy link
Copy Markdown
Contributor Author

@cbodley what backport branches could this affect?

@mattbenjamin upstream reef and all downstream branches, but we're only likely to see crashes when the backend is dbstore

@mattbenjamin

Copy link
Copy Markdown
Contributor

@cbodley what backport branches could this affect?

@mattbenjamin upstream reef and all downstream branches, but we're only likely to see crashes when the backend is dbstore

ack, thanks

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 <[email protected]>
Comment thread src/rgw/rgw_rest_s3.cc
int RGWGetObj_ObjStore_S3::get_decrypt_filter(std::unique_ptr<RGWGetObj_Filter> *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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dang this reverts your change from #52933, which caused some other server-side encryption tests to fail against dbstore; even if we don't have a manifest, we still need to call rgw_s3_prepare_decrypt() to reject HEAD/GET requests that don't have the necessary headers

@cbodley

cbodley commented Sep 19, 2023

Copy link
Copy Markdown
Contributor Author

qa was successful except for dbstore failures, will rerun with the updated commit

@cbodley

cbodley commented Sep 21, 2023

Copy link
Copy Markdown
Contributor Author

cc @dang @mattbenjamin

[ RUN      ] BucketCache.List2Inotify1
waiting for 50ms for cache sync
waiting for 100ms for cache sync
waiting for 200ms for cache sync
waiting for 400ms for cache sync
waiting for 800ms for cache sync
waiting for 1600ms for cache sync
waiting for 3200ms for cache sync
waiting for 6400ms for cache sync
waiting for 12800ms for cache sync
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/rgw/test_posix_bucket_cache.cc:395: Failure
Expected equality of these values:
  names.size()
    Which is: 0
  25
[  FAILED  ] BucketCache.List2Inotify1 (9002 ms)

@cbodley

cbodley commented Sep 21, 2023

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@cbodley

cbodley commented Sep 21, 2023

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@cbodley

cbodley commented Sep 21, 2023

Copy link
Copy Markdown
Contributor Author

@dang

dang commented Sep 26, 2023

Copy link
Copy Markdown
Contributor

cc @dang @mattbenjamin

[ RUN      ] BucketCache.List2Inotify1
waiting for 50ms for cache sync
waiting for 100ms for cache sync
waiting for 200ms for cache sync
waiting for 400ms for cache sync
waiting for 800ms for cache sync
waiting for 1600ms for cache sync
waiting for 3200ms for cache sync
waiting for 6400ms for cache sync
waiting for 12800ms for cache sync
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/rgw/test_posix_bucket_cache.cc:395: Failure
Expected equality of these values:
  names.size()
    Which is: 0
  25
[  FAILED  ] BucketCache.List2Inotify1 (9002 ms)

This test may just not be reliable on CI. Something about the environment seems to make it hang. Should we disable it for now?

@dang

dang commented Sep 26, 2023

Copy link
Copy Markdown
Contributor

Oh, it got no results. So inotify isn't working at all in that case, rather than just being slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants