You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/11/15 08:20:27 UTC

[GitHub] [rocketmq] Aaron-He commented on a change in pull request #3475: [ISSUE #3474] fix illegal message attack

Aaron-He commented on a change in pull request #3475:
URL: https://github.com/apache/rocketmq/pull/3475#discussion_r749090134



##########
File path: remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java
##########
@@ -149,6 +150,9 @@ public static RemotingCommand rocketMQProtocolDecode(final byte[] headerArray) {
         // String remark
         int remarkLength = headerBuffer.getInt();
         if (remarkLength > 0) {
+            if (remarkLength > headerArray.length) {

Review comment:
       > Will it cause the similar problem if you modify other values in the header?
   
   In addition to remarkLength and extFieldsLength, modifying other values in the header will not create large objects, but will only fail to read and throw exceptions




-- 
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: dev-unsubscribe@rocketmq.apache.org

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