Bug #75569
closedrgw: crash in STSService::assumeRole() when admin/system user triggers permission override
0%
Description
radosgw crashes with a null pointer dereference in STS::STSService::assumeRole() when an AssumeRole request is made by an admin user or a system request.
{
"backtrace": [
"/lib64/libc.so.6(+0x3ebf0) [0x7d1de2495bf0]",
"(STS::STSService::assumeRole(DoutPrefixProvider const*, STS::AssumeRoleRequest&, optional_yield)+0x253) [0x5aa37d789853]",
"(RGWSTSAssumeRole::execute(optional_yield)+0x134) [0x5aa37d74a4d4]",
"(rgw_process_authenticated(RGWHandler_REST*, RGWOp*&, RGWRequest*, req_state*, optional_yield, rgw::sal::Driver*, bool)+0xa70) [0x5aa37d734530]",
"(process_request(RGWProcessEnv const&, RGWRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RGWRestfulIO*, 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> >, int*)+0xfd0) [0x5aa37d735d10]",
"/usr/bin/radosgw(+0xe49644) [0x5aa37e047644]",
"/usr/bin/radosgw(+0x488bb6) [0x5aa37d686bb6]",
"/usr/bin/radosgw(+0x46a494) [0x5aa37d668494]",
"make_fcontext()"
],
"ceph_version": "19.2.3",
"crash_id": "2026-03-17T06:36:43.188081Z_e3b14d0-79a8-4907-834f-46c0457969d9",
"entity_name": "client.rgw.01",
"os_id": "centos",
"os_name": "CentOS Stream",
"os_version": "9",
"os_version_id": "9",
"process_name": "radosgw",
"stack_sig": "5df16bc7bf9a1bfc851808de9cdc3d16471baca1fc8c36fce755fa542546b37e",
"timestamp": "2026-03-17T06:36:43.188081Z",
"utsname_hostname": "cephnode01",
"utsname_machine": "x86_64",
"utsname_release": "6.8.0-90-generic",
"utsname_sysname": "Linux",
"utsname_version": "#91~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 15:20:45 UTC 2"
}
Reproduction
An admin user sending an AssumeRole request with an invalid or non-existent RoleArn will trigger the override path, crash the rgw process.
MH Updated by Matthew Heler 9 months ago
- Copied from Bug #75540: rgw_file: a std::string_view pointing to a current common_prefix can be used uninitialized added
MH Updated by Matthew Heler 9 months ago
- Copied from deleted (Bug #75540: rgw_file: a std::string_view pointing to a current common_prefix can be used uninitialized)
MH Updated by Matthew Heler 9 months ago
To reproduce:
- 1. Create an admin user
radosgw-admin user create --uid=adminuser --display-name="Admin" --admin
- 2. Create any role
radosgw-admin role create --role-name=crashtest --path=/ --assume-role-policy-doc='{"Version":"2012-10-17","Statement" [{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":"sts:AssumeRole"}]}'
- 3. AssumeRole with a wrong path in the ARN → crash
aws sts assume-role \
--role-arn "arn:aws:iam:::role/bogus/crashtest" \
--role-session-name test \
--endpoint-url http://localhost:8000
MH Updated by Matthew Heler 9 months ago
- Pull request ID set to 67863
CB Updated by Casey Bodley 9 months ago
- Priority changed from Urgent to High
DG Updated by Daniel Gryniewicz 9 months ago
- Status changed from New to Fix Under Review
MH Updated by Matthew Heler 8 months ago
- Status changed from Fix Under Review to Pending Backport
UB Updated by Upkeep Bot 8 months ago
- Merge Commit set to cdf35a1403cfc84f5121ccfbac4fdf2eedd10d91
- Fixed In set to v21.0.0-713-gcdf35a1403
- Upkeep Timestamp set to 2026-04-20T15:05:51+00:00
UB Updated by Upkeep Bot 8 months ago
- Copied to Backport #76129: squid: rgw: crash in STSService::assumeRole() when admin/system user triggers permission override added
UB Updated by Upkeep Bot 8 months ago
- Copied to Backport #76130: tentacle: rgw: crash in STSService::assumeRole() when admin/system user triggers permission override added
UB Updated by Upkeep Bot 8 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Resolved
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-04-20T15:05:51+00:00 to 2026-08-27T18:30:06+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~721
- Upkeep Timestamp changed from 2026-08-27T18:30:06+00:00 to 2026-10-24T01:49:37+00:00