Blacklist more kernel modules to reduce attack surface

1 Like

Merged.

2 Likes
1 Like
W: security-misc: obsolete-command-in-modprobe.d-file etc/modprobe.d/30_security-misc.conf install
N:
W: obsolete-command-in-modprobe.d-file
N:
N:   Use of 'install' and 'remove' commands in module files in
N:   /etc/modprobe.d and /etc/modules-load.d is deprecated and should be
N:   replaced with 'softdep' commands.
N:   
N:   Severity: warning
N:   
N:   Check: modprobe
N:

I don’t think softdep would replace security-misc use case of install msr /bin/false etc.

Finally, the use of /bin/false should perhaps be replaced with /bin/true.
Blacklist more kernel modules by raja-grewal · Pull Request #109 · Kicksecure/security-misc · GitHub

I prefer module load failures to produce error messages that can be investigated over silent breakage that is hard to track down what is causing it.

Could you please revert that specific commit?

Instead of /bin/false perhaps the following would be even easier to investigate?

/bin/disabled-by-security-misc

#!/bin/bash
echo "$0: ERROR: This kernel module is disabled by package security-misc by default. Most likely by configuration file /etc/modprobe.d/30_security-misc.conf | args: $@" >&2
exit 1

Good point, I reverted that commit.

I also agree that having a unique error for blacklisted modules would be easier to trace and have implemented your suggestion.

Will test more thoroughly soon.

1 Like

Merged, thank you!

I am not sure blacklisting CD-ROM is a good idea yet. Therefore commented out for now.

There will be a Kicksecure ISO live / installer at some point as well as the same for Whonix-Host. As implemented now, that ISO might be broken by default when booting from DVD.

poll:

There might be be a way to un-blacklist CD-ROM / DVD for ISO only.

Modules cdrom / sr_mod probably also required to boot a live / installer ISO inside a VM?

Added more kernel modules to the blacklist. Currently they are all prevented from automatically loading rather than being permanently disabled. We can then potentially begin the process of disabling them once compatibility is understood.

Perhaps simply blocking them from automatically loading for the time being would be an acceptable middle-ground until this can be investigated further?

1 Like