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