From: David Howells Date: Wed, 5 Apr 2017 16:40:30 +0000 (+0100) Subject: Enforce module signatures if the kernel is locked down X-Git-Tag: archive/raspbian/4.15.4-1+rpi1~1^2^2^2^2^2^2^2~44 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d39d5c1ea7425db8f814f5b0bff5045db65c0d1a;p=linux.git Enforce module signatures if the kernel is locked down If the kernel is locked down, require that all modules have valid signatures that we can verify. Signed-off-by: David Howells Gbp-Pq: Topic features/all/lockdown Gbp-Pq: Name 0041-Enforce-module-signatures-if-the-kernel-is-locked-do.patch --- diff --git a/kernel/module.c b/kernel/module.c index 4a3665f8f83..3f1de34c6d1 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2777,7 +2777,7 @@ static int module_sig_check(struct load_info *info, int flags) } /* Not having a signature is only an error if we're strict. */ - if (err == -ENOKEY && !sig_enforce) + if (err == -ENOKEY && !sig_enforce && !kernel_is_locked_down()) err = 0; return err;