1.1.1.1 Ensure cramfs kernel module is not available

Information

The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.

Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

Solution

Run the following to unload and disable the cramfs kernel module. This can also be done by running the script included below.

Run the following commands to unload the cramfs kernel module:

# modprobe -r cramfs 2>/dev/null
# rmmod cramfs 2>/dev/null

Perform the following to disable the cramfs kernel module:

Create a file ending inconf with install cramfs /bin/false in the /etc/modprobe.d/ directory

Example:

# printf '\n%s\n' "install cramfs /bin/false" >> cramfs.conf

Create a file ending inconf with blacklist cramfs in the /etc/modprobe.d/ directory

Example:

# printf '\n%s\n' "blacklist cramfs" >> cramfs.conf

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|9.2

Plugin: Unix

Control ID: dec8a4a75a20b2d633091e2e5c9db610de21e9b319e3c2f37a56786f557d399e