AlmaLinux OS 9 must be configured to use TCP syncookies.

STIG ID: ALMA-09-042480  |  SRG: SRG-OS-000420-GPOS-00186 |  Severity: medium |  CCI: CCI-002385,CCI-001095 |  Vulnerability Id: V-269435

Vulnerability Discussion

Denial of Service (DoS) is a condition when a resource is not available for legitimate users. When this occurs, the organization either cannot accomplish its mission or must operate at degraded capacity.

This requirement addresses the configuration of the operating system to mitigate the impact of DoS attacks that have occurred or are ongoing on system availability. For each system, known and potential DoS attacks must be identified and solutions for each type implemented. A variety of technologies exist to limit or, in some cases, eliminate the effects of DoS attacks (e.g., limiting processes or establishing memory partitions). Employing increased capacity and bandwidth, combined with service redundancy, may reduce the susceptibility to some DoS attacks.

Satisfies: SRG-OS-000420-GPOS-00186, SRG-OS-000142-GPOS-00071

Check

Verify AlmaLinux OS 9 is configured to use IPv4 TCP syncookies with the following command:

$ sysctl net.ipv4.tcp_syncookies

net.ipv4.tcp_syncookies = 1

Check that the configuration files are present to enable this kernel parameter.

$ /usr/lib/systemd/systemd-sysctl --cat-config | egrep -v '^(#|;)' | grep -F net.ipv4.tcp_syncookies | tail -1

net.ipv4.tcp_syncookies = 1

If the network parameter "ipv4.tcp_syncookies" is not equal to "1" or nothing is returned, this is a finding.

Fix

Configure AlmaLinux OS 9 to use TCP syncookies using the following command:

$ echo 'net.ipv4.tcp_syncookies = 1' > /etc/sysctl.d/60-syncookies.conf

Load settings from all system configuration files with the following command:

$ sysctl --system