.forge/issues/476e0fbb-25b5-4051-92ae-8e38a1fef02e/issue.md 1.8 KiB 39 lines Raw

id: 476e0fbb-25b5-4051-92ae-8e38a1fef02e title: 'serve: unbounded thread-per-connection + 500ms ack sleep = trivial availability DoS' state: closed labels:


hu13 serve is thread-per-connection with no cap, and every inbox response sleeps 500 ms.

Verified:

before: 1 thread
$ python3 open 300 idle sockets sending "GET / HTTP/1.1\r\nHost: x\r\n" (no terminator)
during: 301 threads   VmRSS 11.8 MB

Those sockets cost nothing per connection and can be kept alive indefinitely (a byte every < read timeout). ~10-30k cheap sockets exhaust the thread/pid limit or memory, and the server stops accepting.

Amplifiers:

Related, same class but separate resource: #63 (git upload-pack with no timeout/cap).

Fix direction:

Acceptance:

view raw