Check: RHEL-07-020720
Red Hat Enterprise Linux 7 STIG:
RHEL-07-020720
(in versions v3 r14 through v3 r5)
Title
The Red Hat Enterprise Linux operating system must be configured so that all local interactive user initialization files executable search paths contain only paths that resolve to the users home directory. (Cat II impact)
Discussion
The executable search path (typically the PATH environment variable) contains a list of directories for the shell to search to find executables. If this path includes the current working directory (other than the user's home directory), executables in these directories may be executed instead of system commands. This variable is formatted as a colon-separated list of directories. If there is an empty entry, such as a leading or trailing colon or two consecutive colons, this is interpreted as the current working directory. If deviations from the default system search path for the local interactive user are required, they must be documented with the Information System Security Officer (ISSO).
Check Content
Verify that all local interactive user initialization files' executable search path statements do not contain statements that will reference a working directory other than the user's home directory. Check the executable search path statement for all local interactive user initialization files in the user's home directory with the following commands: Note: The example will be for the smithj user, which has a home directory of "/home/smithj". # grep -i path= /home/smithj/.* /home/smithj/.bash_profile:PATH=$PATH:$HOME/.local/bin:$HOME/bin If any local interactive user initialization files have executable search path statements that include directories outside of their home directory, this is a finding.
Fix Text
Edit the local interactive user initialization files to change any PATH variable statements that reference directories other than their home directory. If a local interactive user requires path variables to reference a directory owned by the application, it must be documented with the ISSO.
Additional Identifiers
Rule ID: SV-204477r792828_rule
Vulnerability ID: V-204477
Group Title: SRG-OS-000480-GPOS-00227
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000366 |
The organization implements the security configuration settings. |
Controls
Number | Title |
---|---|
CM-6 |
Configuration Settings |