dpcollins-google opened a new pull request, #12399:
URL: https://github.com/apache/kafka/pull/12399

   When parsing code receives a payload for a variable length field where the 
length is specified in the code as some arbitrarily large number (assume 
INT32_MAX for example) this will immediately try to allocate an ArrayList to 
hold this many elements, before checking whether this is a reasonable array 
size given the available data. 
   
   The fix for this is to instead throw a runtime exception if the length of a 
variably sized container exceeds the amount of remaining data. Then, the worst 
a user can do is force the server to allocate 8x the size of the actual 
delivered data (if they claim there are N elements for a container of Objects 
(i.e. not a byte string) and each Object bottoms out in an 8 byte pointer in 
the ArrayList's backing array).
   
   This was identified by fuzzing the kafka request parsing code.


-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to