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

Infinite loop in SimpleHeaderConverter and Values classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.1.1, 2.0.2, 2.3.0, 2.2.1, 2.2.2, 2.4.0, 2.3.1, 2.5.0, 2.4.1, 2.6.0, 2.5.1
    • 2.3.2, 2.4.2, 2.7.0, 2.5.2, 2.6.1
    • connect
    • None

    Description

      A header value with the byte sequence 0xEF, 0xBF, 0xBF will cause an infinite loop in the Values::parseString method. Since that method is invoked by the default header converter (SimpleHeaderConverter), any sink record with that byte array will, by default, cause a sink task reading that record to stall forever.

      This occurs because that byte sequence, when parsed as a UTF-8 string and then read by a StringCharacterIterator, causes the CharacterIterator.DONE character to be returned from StringCharacterIterator::currentStringCharacterIterator::next, etc., and a check for that character is used by the Values class for its parsing logic.

      Attachments

        Issue Links

          Activity

            People

              ChrisEgerton Chris Egerton
              ChrisEgerton Chris Egerton
              Randall Hauch Randall Hauch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: