1.1.1.4 Ensure hfsplus kernel module is not available

Information

The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.

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 hfsplus kernel module.

- Run the following commands to unload the hfsplus kernel module:

# modprobe -r hfsplus 2>/dev/null
# rmmod hfsplus 2>/dev/null <xhtml:ol start="2"> - Perform the following to disable the hfsplus kernel module:

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

Example:

# printf '%s\n' "" "install hfsplus /bin/false" >> /etc/modprobe.d/60-hfsplus.conf

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

Example:

# printf '%s\n' "" "blacklist hfsplus" >> /etc/modprobe.d/60-hfsplus.conf

See Also

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