RHEL-09-213080 - RHEL 9 must restrict usage of ptrace to descendant processes.

Information

Unrestricted usage of ptrace allows compromised binaries to run ptrace on other processes of the user. Like this, the attacker can steal sensitive information from the target processes (e.g., SSH sessions, web browser, etc.) without any additional assistance from the user (i.e., without resorting to phishing).

Satisfies: SRG-OS-000132-GPOS-00067, SRG-OS-000480-GPOS-00227

Solution

Configure RHEL 9 to restrict usage of ptrace to descendant processes by adding the following line to a file, in the '/etc/sysctl.d' directory:

kernel.yama.ptrace_scope = 1

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_9_V2R2_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|CM-6b., 800-53|SC-2, CAT|II, CCI|CCI-000366, CCI|CCI-001082, Rule-ID|SV-257811r958514_rule, STIG-ID|RHEL-09-213080, Vuln-ID|V-257811

Plugin: Unix

Control ID: f138a11da5a7c6222667f5a3f688e85a18d6d5e4804a68a2ff7bd9950534104e