You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yuluo-yx (via GitHub)" <gi...@apache.org> on 2026/08/28 16:51:15 UTC

[I] [Studio][Bug] Reject overflowing metric query windows [rocketmq-dashboard]

yuluo-yx opened a new issue, #2698:
URL: https://github.com/apache/rocketmq-dashboard/issues/2698

   ## Problem
   
   Metric query validation subtracts caller-controlled signed `long` timestamps before checking their order and maximum range. Extreme values can overflow: a reversed window can wrap to a small positive range, while an oversized ordered window can wrap negative and receive the wrong validation result.
   
   ## Reproduction
   
   Call the metrics query service with either of these windows:
   
   - `start = Long.MAX_VALUE`, `end = Long.MIN_VALUE`
   - `start = Long.MIN_VALUE`, `end = Long.MAX_VALUE`
   
   The subtraction no longer represents the actual ordering or duration.
   
   ## Expected behavior
   
   Compare the endpoints before arithmetic, enforce the 31-day limit without overflow, and continue accepting an exact 31-day window near the signed timestamp boundary.
   
   ## Scope
   
   Update the metrics query-window validation and add focused regression tests for reversed, oversized, and exact-boundary windows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Reject overflowing metric query windows [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #2698:
URL: https://github.com/apache/rocketmq-dashboard/issues/2698#issuecomment-5506314349

   Resolved by #2849 (merged into rocketmq-studio as 33fe90ff).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Reject overflowing metric query windows [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #2698: [Studio][Bug] Reject overflowing metric query windows
URL: https://github.com/apache/rocketmq-dashboard/issues/2698


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Reject overflowing metric query windows [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #2698:
URL: https://github.com/apache/rocketmq-dashboard/issues/2698#issuecomment-5455445568

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   Metric query validation subtracts caller-controlled signed `long` timestamps before checking order and maximum range. Extreme values can overflow: a reversed window wraps to a small positive range (passing validation), while an oversized ordered window wraps negative (receiving wrong validation result).
   
   **Root Cause:** Arithmetic overflow in timestamp subtraction — signed `long` subtraction can wrap around, bypassing range and order checks.
   **Impact:** Metrics query API; invalid query windows can pass validation or valid ones can be rejected.
   **Severity:** High — integer overflow in validation logic can lead to resource exhaustion (unbounded queries) or incorrect rejection.
   
   The proposed scope (use `Math.subtractExact` or equivalent overflow-safe arithmetic + boundary tests) is the correct fix.
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org