The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Check
Verify RHEL 10 is configured so that "/var" is mounted with the "nodev" option:
$ mount | grep /var /dev/mapper/luks-51150299-f295-4145-b8f0-ebe9c6dfd5a0 on /var type xfs (rw,nodev,relatime,seclabel,attr2)
If the "/var" file system is mounted without the "nodev" option, this is a finding.
Fix
Configure RHEL 10 to mount "/var" with the "nodev" option.
Modify "/etc/fstab" to use the "nodev" option on the "/var" 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: