RockteMQ-AI commented on issue #10832: URL: https://github.com/apache/rocketmq/issues/10832#issuecomment-5225050081
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase (`develop` branch). **Root Cause:** `RemotingCommand.decode` reads `oriHeaderLen` and extracts the protocol type via `getProtocolType(oriHeaderLen)`. If the frame header is malformed, `SerializeType.valueOf` may return null, and `headerDecode` falls through the switch returning null. Additionally, `RemotingSerializable.decode` can throw unchecked exceptions on malformed JSON headers. **Impact:** Malformed frame headers from network corruption or malicious input cause uncontrolled exceptions instead of clean `RemotingCommandException` handling. **Severity:** medium **Affected code:** `remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java` An automated fix proposal will 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]
