P1 · net.ipv4.tcp_syncookies — cryptographic shield
| Reference | Combat (AGL) | Range |
|---|---|---|
| distribution-dependent | 1 | 0 | 1 · fail-safe → 1 |
Anatomy of the threat: the mechanics of SYN-Flood strangulation
In normal mode, the client sends SYN, the server allocates a data structure in RAM for the socket, reserves a buffer, and replies with SYN-ACK; the client sends ACK — the session is established. During a SYN-Flood attack, a botnet sends millions of SYN packets per second, spoofing source IP addresses. The Linux kernel, following the standard protocol, honestly allocates system memory for every hostile probe and freezes waiting for the final ACK, which will never arrive. The half-open connection queue instantly becomes clogged with zombie sessions: RAM is exhausted, the CPU operates in overload mode servicing dead descriptors, and legitimate users encounter denial of service.
Physics of the AGL defensive circuit (ON mode)
When the administrator switches the network armor to ON mode, the Laboratory arms the net.ipv4.tcp_syncookies parameter with the value 1. A fundamental restructuring of the network stack logic occurs: the server completely stops allocating RAM for incoming half-open TCP connections. Instead of reserving RAM buffers, the kernel generates a cryptographic tag — a SYN Cookie: the attacker's IP address and port, local IP and port, the system's secret compile-time salt, and the current timestamp are run through a fast hash algorithm; the result is packed into the 32-bit initial Sequence Number of the outgoing SYN-ACK packet — and the server fires the packet back into the Internet, instantly forgetting the connection. The server's memory remains clean. If a bot with a spoofed IP attacked the socket, the SYN-ACK flies into the void, without spending a byte of RAM. If a real user connects, their OS must return an ACK, incrementing the received Sequence Number by one; the kernel subtracts one, verifies the hash against the secret salt — and the socket is born in memory in nanoseconds, bypassing the queue.
Architectural fail-safe guard of the Laboratory
Disabling this parameter during an assault means instant clinical death of the operating system, so the Laboratory implements an uncompromising security validator at the point of application: in config.go, the trigger is hard-clamped to binary boundaries 0 or 1. Even if an inexperienced administrator makes a typo or enters a garbage, invalid, or negative value in config.json, the hard fail-safe circuit ignores the error and forcibly sets 1 — protection is active.