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

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

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_V1R3_STIG.zip

Item Details

References: CAT|II, CCI|CCI-000366, CCI|CCI-001082, Rule-ID|SV-257811r942979_rule, STIG-ID|RHEL-09-213080, Vuln-ID|V-257811

Plugin: Unix

Control ID: ecc0b6be3849a8233e48b02be2bbc48285be7b7d10604877ad3e76f5342c8784