Check: RHEL-09-652025
RHEL 9 STIG:
RHEL-09-652025
(in version v2 r3)
Title
RHEL 9 must be configured so that the rsyslog daemon does not accept log messages from other servers unless the server is being used for log aggregation. (Cat II impact)
Discussion
Unintentionally running a rsyslog server accepting remote messages puts the system at increased risk. Malicious rsyslog messages sent to the server could exploit vulnerabilities in the server software itself, could introduce misleading information into the system's logs, or could fill the system's storage leading to a denial of service. If the system is intended to be a log aggregation server, its use must be documented with the information system security officer (ISSO).
Check Content
Verify that RHEL 9 is not configured to receive remote logs using rsyslog with the following commands: $ grep -i modload /etc/rsyslog.conf /etc/rsyslog.d/* $ModLoad imtcp $ModLoad imrelp $ModLoad imudp $ grep -i 'load="imtcp"' /etc/rsyslog.conf /etc/rsyslog.d/* $ grep -i 'load="imrelp"' /etc/rsyslog.conf /etc/rsyslog.d/* $ grep -i serverrun /etc/rsyslog.conf /etc/rsyslog.d/* $InputTCPServerRun 514 $InputRELPServerRun 514 $InputUDPServerRun 514 $ grep -i 'port="\S*"' /etc/rsyslog.conf /etc/rsyslog.d/* /etc/rsyslog.conf:#input(type="imudp" port="514") /etc/rsyslog.conf:#input(type="imtcp" port="514") /etc/rsyslog.conf:#Target="remote_host" Port="XXX" Protocol="tcp") If any uncommented lines are returned by the commands, rsyslog is configured to receive remote messages, and this is a finding. Note: An error about no files or directories from the above commands may be returned. This is not a finding. If any modules are being loaded in the "/etc/rsyslog.conf" file or in the "/etc/rsyslog.d" subdirectories, ask to see the documentation for the system being used for log aggregation. If the documentation does not exist or does not specify the server as a log aggregation system, this is a finding.
Fix Text
Configure RHEL 9 to not receive remote logs using rsyslog. Remove the lines in /etc/rsyslog.conf and any files in the /etc/rsyslog.d directory that match any of the following: module(load="imtcp") module(load="imudp") module(load="imrelp") input(type="imudp" port="514") input(type="imtcp" port="514") input(type="imrelp" port="514") The rsyslog daemon must be restarted for the changes to take effect: $ sudo systemctl restart rsyslog.service
Additional Identifiers
Rule ID: SV-258143r1045283_rule
Vulnerability ID: V-258143
Group Title: SRG-OS-000480-GPOS-00227
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000366 |
Implement the security configuration settings. |
Controls
Number | Title |
---|---|
CM-6 |
Configuration Settings |