public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MODSIGN: Don't taint unless signature enforcing is enabled
@ 2013-01-04 19:12 Josh Boyer
  2013-01-07  1:09 ` Rusty Russell
  0 siblings, 1 reply; 12+ messages in thread
From: Josh Boyer @ 2013-01-04 19:12 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Frank Ch. Eigler, dhowells, linux-kernel

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.  That in turn taints the kernel, which also
disables lockdep.

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.

Reported-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---
 kernel/module.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/module.c b/kernel/module.c
index 250092c..a50172e 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2443,8 +2443,10 @@ static int module_sig_check(struct load_info *info)
 	if (err < 0 && fips_enabled)
 		panic("Module verification failed with error %d in FIPS mode\n",
 		      err);
-	if (err == -ENOKEY && !sig_enforce)
+	if (err == -ENOKEY && !sig_enforce) {
+		info->sig_ok = true;
 		err = 0;
+	}
 
 	return err;
 }
-- 
1.8.0.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-21  1:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 19:12 [PATCH] MODSIGN: Don't taint unless signature enforcing is enabled Josh Boyer
2013-01-07  1:09 ` Rusty Russell
2013-01-07 14:58   ` Josh Boyer
2013-01-15 19:09     ` [PATCH] MODSIGN: Add TAINT_NOKEY_MODULE Josh Boyer
2013-01-16  3:34       ` Rusty Russell
2013-01-16 13:21         ` Josh Boyer
2013-01-16 19:37         ` Josh Boyer
2013-01-17  0:57           ` Rusty Russell
2013-01-17 15:02             ` Dave Jones
     [not found]               ` <8738xvxv55.fsf@rustcorp.com.au>
2013-01-21  0:19                 ` Frank Ch. Eigler
2013-01-21  1:50                   ` Rusty Russell
2013-01-21  0:46                 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox