Re: [PATCH] MODSIGN: Don't taint unless signature enforcing isenabled
From: Josh Boyer
Date: Mon Jan 07 2013 - 09:58:30 EST
On Mon, Jan 07, 2013 at 11:39:47AM +1030, Rusty Russell wrote:
> Josh Boyer <jwboyer@xxxxxxxxxx> writes:
> > With module signing enabled but not in enforcing mode, we don't consider
> > unsigned modules to be an error. However, we only mark sig_ok as true if
> > a signature verified. This causes the module to be tainted with the
> > TAINT_FORCED_MODULE flag.
> Wait, what? So, what does CONFIG_MODULE_SIG=y with MODULE_SIG_FORCE=n
> mean? Why not just call that CONFIG_USELESS_BLOAT? :)
You can still enable enforcing mode with that configuration by passing
sig_enforce=1 as a kernel parameter. Some distros default to this
> > That in turn taints the kernel, which also disables lockdep.
> Yeah, lockdep is oversensitive. This has been argued before, take it up
> with Ingo. Perhaps we need a taint flag bit to indicate that lockdep
> should actually be disabled?
Well, sure maybe. Frank already pointed out that the OOT taint doesn't
disable lockdep. Having something more general would be good. If there
isn't an easy way to do that, adding a TAINT_UNSIGNED to be used instead
of TAINT_FORCED_MODULE might work. I've CC'd Ingo and Peter.
> > Tainting the module and kernel when we don't consider something to be an
> > error seems excessive. This marks sig_ok as true if we aren't in enforcing
> > mode.
> If we were to do this, please follow Plauger's Law: "Don't patch bad
> code - rewrite it."
> In this case, rip out the now-useless sig_ok field.
OK. I'll respin with that change if nothing else seems workable.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/