Project

General

Profile

Actions

Bug #78093

closed
RS CB

RGW REST Account Quota max-size Is Parsed as 32-bit Integer

Bug #78093: RGW REST Account Quota max-size Is Parsed as 32-bit Integer

Added by Rafal Stanczak 5 months ago. Updated 3 months ago.

Status:
Backporting
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
other
Backport:
squid tentacle umbrella
Regression:
No
Severity:
4 - irritation
Reviewed:
Affected Versions:
ceph-qa-suite:
rest
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-1107-gaf595ea7fb
Released In:
Upkeep Timestamp:
2026-08-27T18:41:35+00:00

Description

There is an issue in the Ceph RGW REST Account Quota API where the max-size quota value is parsed as a 32-bit integer.
As a result, it is not possible to set an account quota larger than 2 GiB through the RGW REST interface.

Currently, the max-size parameter in RGWOp_Account_Quota_Set::execute() is parsed using RESTArgs::get_int32(). This limits the maximum accepted quota value to the signed 32-bit integer range.
Because account quota sizes may need to exceed 2 GiB, this causes larger quota values to be truncated to zero.

Proposed Fix

Parse max-size as int64_t instead of int32_t and use RESTArgs::get_int64() instead of RESTArgs::get_int32().

--- a/src/rgw/rgw_rest_account.cc
+++ b/src/rgw/rgw_rest_account.cc
@ -273,9 +273,9 @ void RGWOp_Account_Quota_Set::execute(optional_yield y)
return;
}

- int32_t quota_max_size = 0;
+ int64_t quota_max_size = 0;
bool has_quota_max_size = false;
- RESTArgs::get_int32(s, "max-size", 0, &quota_max_size, &has_quota_max_size);
+ RESTArgs::get_int64(s, "max-size", 0, &quota_max_size, &has_quota_max_size);
if (has_quota_max_size) {
op_state.quota_max_size = quota_max_size;
}


Related issues 3 (1 open — 2 closed)

Copied to rgw - Backport #78317: squid: RGW REST Account Quota max-size Is Parsed as 32-bit IntegerNewCasey Bodley

Actions
Copied to rgw - Backport #78318: tentacle: RGW REST Account Quota max-size Is Parsed as 32-bit IntegerResolvedCasey Bodley

Actions
Copied to rgw - Backport #78319: umbrella: RGW REST Account Quota max-size Is Parsed as 32-bit IntegerResolvedCasey Bodley

Actions

CB Updated by Casey Bodley 5 months ago Actions #1

  • Status changed from New to Fix Under Review
  • Target version deleted (v20.2.2)
  • Backport set to squid tentacle umbrella
  • Pull request ID set to 69876

CB Updated by Casey Bodley 5 months ago Actions #2

  • Assignee set to Casey Bodley

UB Updated by Upkeep Bot 5 months ago Actions #3

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to af595ea7fbd1c0b496de69a580c3712a5c5557c8
  • Fixed In set to v21.3.0-1107-gaf595ea7fb
  • Upkeep Timestamp set to 2026-07-16T21:04:59+00:00

UB Updated by Upkeep Bot 5 months ago Actions #4

  • Copied to Backport #78317: squid: RGW REST Account Quota max-size Is Parsed as 32-bit Integer added

UB Updated by Upkeep Bot 5 months ago Actions #5

  • Copied to Backport #78318: tentacle: RGW REST Account Quota max-size Is Parsed as 32-bit Integer added

UB Updated by Upkeep Bot 5 months ago Actions #6

  • Copied to Backport #78319: umbrella: RGW REST Account Quota max-size Is Parsed as 32-bit Integer added

UB Updated by Upkeep Bot 5 months ago Actions #7

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #8

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-07-16T21:04:59+00:00 to 2026-08-27T18:41:35+00:00
Actions

Also available in: PDF Atom