1.1.2.1.4 Ensure noexec option set on /tmp partition

Information

The noexec mount option specifies that the filesystem cannot contain executable binaries.

Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp.

Solution

- IF - a separate partition exists for /tmp.

Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition.

Example:

<device> /tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /tmp with the configured options:

# mount -o remount /tmp

Impact:

Setting the noexec option on /tmp may prevent installation and/or updating of some 3rd party software.

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7(2), CCI|CCI-001764, CSCv7|14.6, Rule-ID|SV-230513r958804_rule, Rule-ID|SV-257867r958804_rule, Rule-ID|SV-269318r1050200_rule, STIG-ID|ALMA-09-026970, STIG-ID|RHEL-08-040125, STIG-ID|RHEL-09-231130

Plugin: Unix

Control ID: c52d92e6f0c9a62b39a55a947a3d8f349713bf40457a4126e3a5629ed5645e64