by TrueDuality · 6y ago · 0 comments
Disabling kernel module loading, or restricting it to signed modules shuts down many of the vectors without using out of tree code. There are many security switches that are generally left off in widely distributed kernels that provide deep protection when you don't need to support everyone's project and app.
For specific distributions like those listed this is fine, but those also generally aren't used in higher assurance environments either.
Is there a place where these options are listed? Preferably with the pros/cons of enabling each option.
Good place to start: building your own kernel from source. I tried that once and was quite overwhelmed with the sheer number of knobs and features that are available.
While I do still want a centralized list of things to do/check for hardening a kernel, I don't think it will _ever_ be exhaustive. And some pros/cons would involve very _deeply_ complex behavior which would be difficult to determine whether or not the tradeoff is even relevant.
sysctl -w "kernel.modules_disabled=1"
which can not be unset without a reboot.