Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9419

Integer Overflow Possible with CircularIterator

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.2, 2.6.0, 2.4.2, 2.5.1
    • Component/s: None
    • Labels:
      None

      Description

      Very unlikely to happen, but as someone that gets called in when something goes wrong, I'd like to remove as many possibilities as possible.

       

      https://github.com/apache/kafka/blob/8c21fa837df6908d9147805e097407d006d95fd4/clients/src/main/java/org/apache/kafka/common/utils/CircularIterator.java#L39-L43

       

      Also, the current implementation will work with a LinkedList, but it won't work well.  The constant call to `get` will perform at O(n^2).  Using an iterator instead allows other Collections to work reasonably well.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              belugabehr David Mollitor

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment