1.1.1.3 Ensure hfs kernel module is not available

Information

The hfs filesystem type is a hierarchical filesystem 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

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

Run the following commands to unload the hfs kernel module:

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

Perform the following to disable the hfs kernel module:

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

Example:

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

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

Example:

# printf '\n%s\n' "blacklist hfs" >> hfs.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: 74e5398a6ae2a01a1e8761dc16d04cc9b570aa9b76296abd462b6e57164c0e11