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
Unload and disable the cramfs kernel module.
- Run the following commands to unload the cramfs kernel module:
# modprobe -r cramfs 2>/dev/null
# rmmod cramfs 2>/dev/null <xhtml:ol start="2"> - 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 '%s\n' "" "install cramfs /bin/false" >> /etc/modprobe.d/60-cramfs.conf
Create a file ending inconf with blacklist cramfs in the /etc/modprobe.d/ directory.
Example:
# printf '%s\n' "" "blacklist cramfs" >> /etc/modprobe.d/60-cramfs.conf