Skip to content

Commit

Permalink
module: printk message when module signature fail taints kernel.
Browse files Browse the repository at this point in the history
Reported-by: Chris Samuel <chris@csamuel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Rusty Russell committed Jan 21, 2013
1 parent 9a92841 commit 64748a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -3192,8 +3192,13 @@ static int load_module(struct load_info *info, const char __user *uargs,

#ifdef CONFIG_MODULE_SIG
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);
}
#endif

/* Now module is in final location, initialize linked lists, etc. */
Expand Down

0 comments on commit 64748a2

Please sign in to comment.