1.312 RHEL-10-700175

Information

RHEL 10 must mount "/var/log" with the "noexec" option.

GROUP ID: V-281243
RULE ID: SV-281243r1166681

The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

Solution

Configure RHEL 10 to mount "/var/log" with the "noexec" option.

Modify "/etc/fstab" to use the "noexec" option on the "/var/log" directory.

To reload all implicit mount units and update the dependency graph so that new options will apply correctly at next remount, run the following command:

$ sudo systemctl daemon-reload

Use the following command to apply the changes immediately without a reboot:

$ sudo mount -o remount /var/log

See Also

https://workbench.cisecurity.org/benchmarks/26403