module: printk message when module signature fail taints kernel.

Reported-by: Chris Samuel <chris@csamuel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2013-01-21 17:03:02 +10:30
parent 9a9284153d
commit 64748a2c90
1 changed files with 6 additions and 1 deletions

View File

@ -3192,8 +3192,13 @@ again:
#ifdef CONFIG_MODULE_SIG #ifdef CONFIG_MODULE_SIG
mod->sig_ok = info->sig_ok; mod->sig_ok = info->sig_ok;
if (!mod->sig_ok) if (!mod->sig_ok) {
printk_once(KERN_NOTICE
"%s: module verification failed: signature and/or"
" required key missing - tainting kernel\n",
mod->name);
add_taint_module(mod, TAINT_FORCED_MODULE); add_taint_module(mod, TAINT_FORCED_MODULE);
}
#endif #endif
/* Now module is in final location, initialize linked lists, etc. */ /* Now module is in final location, initialize linked lists, etc. */