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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
