RHEL-10-701140 - RHEL 10 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. The attacker can then 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).

Solution

Configure RHEL 10 to restrict the usage of ptrace to descendant processes.

Create the drop-in if it does not already exist:

$ sudo vi /etc/sysctl.d/99-kernel_yama.ptrace_scope.conf

Add the following line to the file:

kernel.yama.ptrace_scope = 1

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

$ sudo sysctl --system

See Also

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

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-2, CAT|II, CCI|CCI-001082, Rule-ID|SV-281316r1167098_rule, STIG-ID|RHEL-10-701140, Vuln-ID|V-281316

Plugin: Unix

Control ID: 4d3652e9819e4366219ac85a059fe2fed948447b4d95060a310389047890a4a7