Security: No connection limits or timeouts enables fork-bomb / slowloris #190
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium
Category: security
Location:
src/server/server.c:65-90,src/shared/protocol.c:92-115Description:
The TCP server accepts every incoming connection and immediately
fork()s a child process insrc/shared/transport_tcp.c:81. There is no limit on concurrent connections, no connection timeout, and no rate limiting. An unauthenticated attacker can open many slow or idle connections to exhaust process slots, memory, or file descriptors (fork bomb / slowloris).This is related to the timeouts feature request but is tracked here as a security hardening item.
Suggested fix:
SO_RCVTIMEO,SO_SNDTIMEO) or usepoll()with a timeout in allreceive_n_data/send_n_dataloops.SO_KEEPALIVEandTCP_USER_TIMEOUT.Labels: security, dos, threading