Actions
Bug #58111
closedcrash: verify_bucket_owner_or_policy
% Done:
100%
Source:
Community (user)
Tags:
backport_processed
Backport:
pacific quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Description
When executing 's3cmd ls s3://a:', rgw was terminated.
ceph version 18.0.0-1025-gb1974230208 (b197423020829e2b98ae1ea48bacaf0d82e53b21) reef (dev) 1: /lib64/libpthread.so.0(+0x12ce0) [0x7fc131ce2ce0] 2: (verify_bucket_owner_or_policy(req_state*, unsigned long)+0x30) [0x555983571d14] 3: (RGWGetBucketLocation::verify_permission(optional_yield)+0x43) [0x555983616059] 4: (rgw_process_authenticated(RGWHandler_REST*, RGWOp*&, RGWRequest*, req_state*, optional_yield, rgw::sal::Store*, bool)+0x11bd) [0x5559833 90959] 5: (process_request(rgw::sal::Store*, RGWREST*, RGWRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rgw::auth::StrategyRegistry const&, RGWRestfulIO*, OpsLogSink*, optional_yield, rgw::dmclock::Scheduler*, std::__cxx11::basic_string <char, std::char_traits<char>, std::allocator<char> >*, std::chrono::duration<unsigned long, std::ratio<1l, 1000000000l> >*, std::shared_ptr< RateLimiter>, rgw::lua::Background*, std::unique_ptr<rgw::sal::LuaManager, std::default_delete<rgw::sal::LuaManager> >&, int*)+0x2fec) [0x555 983395885] 6: /ceph/build/bin/radosgw(+0xbc0cc6) [0x5559832c7cc6] 7: /ceph/build/bin/radosgw(+0xbc1757) [0x5559832c8757] 8: /ceph/build/bin/radosgw(+0xbc190f) [0x5559832c890f] 9: /ceph/build/bin/radosgw(+0xbc1b0c) [0x5559832c8b0c] 10: make_fcontext()
The reason is that the bucket name includes a colon, which is the same issue as https://tracker.ceph.com/issues/56248.
But the patches commented in the tracker cover only a portion of a code path, so the problem of the rgw crash still remains.
In addition, the response code is inconsistent.
When requesting "list" to a non-existent bucket, rgw normally returns 404(Not Found).
But if the bucket name includes a colon, rgw returns 403(Forbidden).
I think both cases should return 404(Not Found) or the second case should return 400(Invalid request).
Actions