The "better safe-than-sorry" argument is hard to build consensus
around. The spectre mitigations ran into similar problems where the
community rightly wanted to see the details and instrument the
problematic paths rather than blanket sprinkle lfence "just to be
safe".
In this case the rules about when a driver is suitably
"hardened" are vague and the overlapping policy engines are confusing.
I'd rather see more concerted efforts focused/limited core changes
rather than leaf driver changes until there is a clearer definition of
hardened.
I.e. instead of jumping to the assertion that fixing up
these init-path vulnerabilities are too big to fix, dig to the next
level to provide more evidence that per-driver opt-in is the only
viable option.
For example, how many of these problematic paths are built-in to the
average kernel config?
A strawman might be to add a sprinkling error
exits in the module_init() of the problematic drivers, and only fail
if the module is built-in, and let modprobe policy handle the rest.
Default policy in user space just seems to be a bad idea here. WhoI do not understand the maintenance burden correlation of where the
should know if a driver is hardened other than the kernel? Maintaining
the list somewhere else just doesn't make sense to me.
policy is driven vs where the list is maintained?
Even if I agreed
with the contention that out-of-tree userspace would have a hard time
tracking the "hardened" driver list there is still an in-tree
userspace path to explore. E.g. perf maintains lists of things tightly
coupled to the kernel, this authorized device list seems to be in the
same category of data.
Also there is the more practical problem that some devices are neededRight, as I suggested [1], just enough early authorization to
for booting. For example in TDX we can't print something to the console
with this mechanism, so you would never get any output before the
initrd. Just seems like a nightmare for debugging anything. There really
needs to be an authorization mechanism that works reasonably early.
I can see a point of having user space overrides though, but we need to
have a sane kernel default that works early.
bootstrap/debug initramfs and then that can authorize the remainder.