]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked...
authorDavid Howells <dhowells@redhat.com>
Wed, 24 May 2017 13:56:06 +0000 (14:56 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 29 Jan 2018 13:45:02 +0000 (07:45 -0600)
Prohibit replacement of the PCMCIA Card Information Structure when the
kernel is locked down.

Suggested-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-pcmcia@lists.infradead.org
(cherry picked from commit c5fe6d4762b16204e218f5299d232b9953c4caaa
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/pcmcia/cistpl.c

index 102646fedb5602b94c7f223aa4b2ffe32d5f25e0..e46c948d724659ff157605a0af50a550063bd9e8 100644 (file)
@@ -1578,6 +1578,9 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
        struct pcmcia_socket *s;
        int error;
 
+       if (kernel_is_locked_down("Direct PCMCIA CIS storage"))
+               return -EPERM;
+
        s = to_socket(container_of(kobj, struct device, kobj));
 
        if (off)