1.1.1.2 Ensure mounting of squashfs filesystems is disabled - lsmod

Information

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

Rationale:

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

Impact:

As Snap packages utilizes squashfs as a compressed filesystem, disabling squashfs will cause Snap packages to fail.

Snap application packages of software are self-contained and work across a range of Linux distributions. This is unlike traditional Linux package management approaches, like APT or RPM, which require specifically adapted packages per Linux distribution on an application update and delay therefore application deployment from developers to their software's end-user. Snaps themselves have no dependency on any external store ('App store'), can be obtained from any source and can be therefore used for upstream software deployment.

Solution

Edit or create a file in the /etc/modprobe.d/ directory ending in .conf with the lines that reads install squashfs /bin/false and blacklist squashfs.
Example:

# printf 'install squashfs /bin/false
blacklist squashfs
' >> /etc/modprobe.d/squashfs.conf

Run the following command to unload the squashfs module:

# modprobe -r squashfs

See Also

https://workbench.cisecurity.org/files/3746

Item Details

Category: CONFIGURATION MANAGEMENT

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

Plugin: Unix

Control ID: b56b60ac144678de92ec42f831e9c81814a66d287b8dc47e04fa01a58fa1aefb