]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - kernel/kexec.c
Merge tag 'drm-next-5.5-2019-10-25' of git://people.freedesktop.org/~agd5f/linux...
[mirror_ubuntu-jammy-kernel.git] / kernel / kexec.c
index 1b018f1a6e0d85647e4cc5e6646cacc15e5a2bee..bc933c0db9bf019aefa7c5bc7061bc2541fb2a00 100644 (file)
@@ -205,6 +205,14 @@ static inline int kexec_load_check(unsigned long nr_segments,
        if (result < 0)
                return result;
 
+       /*
+        * kexec can be used to circumvent module loading restrictions, so
+        * prevent loading in that case
+        */
+       result = security_locked_down(LOCKDOWN_KEXEC);
+       if (result)
+               return result;
+
        /*
         * Verify we have a legal set of flags
         * This leaves us room for future extensions.