Skip to main content
InterviewHubPRO
Section Overview
Q30

Question 30 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

60%
Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

What is the difference between TCP SYN Flood attacks and SYN Cookies?

senior Levellinux-osAdvanced Internals

In Simple Words:

  • TCP SYN Flood: Attacker sends millions of SYN packets with spoofed source IPs, ignoring the SYN-ACK. The server's SYN Backlog Queue fills up waiting for nonexistent ACKs, crashing the server.
  • SYN Cookies (tcp_syncookies = 1): When the backlog queue fills up, the server stops storing connection state in memory.
    • Encodes connection state into the Initial Sequence Number (ISN) of the SYN-ACK packet.
    • State is reconstructed only when the legitimate client sends back the final ACK!