Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-764

DDOS possible in only a few seconds...

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.0-RC1
    • Fix Version/s: 2.0.8
    • Component/s: None
    • Labels:
      None

      Description

      We can kill a server in just a few seconds using the stress test found in DIRMINA-762.

      If we inject messages with no delay, using 50 threads to do that, the ProtocolCodecFilter$MessageWriteRequest is stuffed with hundred of thousands messages waiting to be written back to the client, with no success.

      On the client side, we receive almost no messages :
      0 messages/sec (total messages received 1)
      2 messages/sec (total messages received 11)
      8 messages/sec (total messages received 55)
      8 messages/sec (total messages received 95)
      9 messages/sec (total messages received 144)
      3 messages/sec (total messages received 162)
      1 messages/sec (total messages received 169)
      ...

      On the server side, the memory is totally swamped in 20 seconds, with no way to recover :
      Exception in thread "pool-1-thread-1" java.lang.OutOfMemoryError: Java heap space

      (see graph attached)

      On the server, ConcurrentLinkedQueue contain the messages to be written (in my case, 724 499 Node are present). There are also 361629 DefaultWriteRequests, 361628 DefaultWriteFutures, 361625 SimpleBuffer, 361 618 ProtocolCodecFilter$MessageWriteRequest and 361 614 ProtocolCodecFilter$EncodedWriteRequests.

      That mean we don't flush them to the client at all.

        Attachments

        1. screenshot-1.jpg
          126 kB
          Emmanuel Lécharny
        2. screenshot-2.jpg
          185 kB
          Emmanuel Lécharny

        Issue Links

          Activity

            People

            • Assignee:
              elecharny Emmanuel Lécharny
              Reporter:
              elecharny Emmanuel Lécharny

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment