smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.81k stars 429 forks source link

TCP SYN flood possible? #961

Open lasiotus opened 3 months ago

lasiotus commented 3 months ago

I've seen smoltcp TCP sockets staying in SynReceived state for a long time, which seems to indicate that smoltcp stack may be vulnerable to SYN Flood attacks. Is it so? Are SYN Cookies used?

whitequark commented 3 months ago

I would expect smoltcp to be vulnerable; it is not a TCP stack hardened against logic attacks on the state machine, here and elsewhere. I don't think anybody has enumerated the possible DoS avenues and if availability is a concern I would suggest not exposing a smoltcp endpoint to wider Internet.

That said, I do expect it to maintain integrity against malicious remote endpoints and there are, as far as I'm aware, no known issues with that.