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

When TLS is applied, broker sends the response frame length in separate TLS packet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2.1
    • None
    • core
    • None

    Description

      The issue was discovered tracking the network dumps.

      Each frame in Kafka wire protocol is prefixed with the 32-bit integer which contains  remaining frame length. When unencrypted TCP is used (PLAINTEXT), the 4 octets are sent inside the same TCP/IP packet as the rest of the frame (at least as long as the whole frame fits). When TLS is enabled, the buffer is flushed immediately after the length is written which results in 33-octets length TLS packet and 101-octets length wire frame carrying just 4 octets of data.

      In the attachments there is tcp dump and captured encryption keys executing metadata query with kafkacat

      The capture was analysed with Wireshark built from the source code. The support for Kafka 2.3 and Kafka over TLS dissection was merged into the master branch, but it has not been released yet.

       

       

      Attachments

        1. dump.pcap
          9 kB
          Piotr Smolinski
        2. keylog.txt
          0.2 kB
          Piotr Smolinski
        3. Screenshot 2019-10-04 at 13.15.03.png
          1.07 MB
          Piotr Smolinski

        Activity

          People

            Unassigned Unassigned
            psmolinski Piotr Smolinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: