diff options
author | David Howells <dhowells@redhat.com> | 2019-08-19 17:17:53 -0700 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2019-08-19 21:54:16 -0700 |
commit | 3f19cad3fa0d0fff18ee126f03a80420ae7bcbc9 (patch) | |
tree | 68225b93a0b22cfd1846c9d5416566ed3cf5455f /drivers/pcmcia | |
parent | 6ea0e815fc5e18597724169caa6e4d46dd8e693d (diff) | |
download | linux-stable-3f19cad3fa0d0fff18ee126f03a80420ae7bcbc9.tar.gz linux-stable-3f19cad3fa0d0fff18ee126f03a80420ae7bcbc9.tar.bz2 linux-stable-3f19cad3fa0d0fff18ee126f03a80420ae7bcbc9.zip |
lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
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>
Signed-off-by: Matthew Garrett <mjg59@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index abd029945cc8..629359fe3513 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -21,6 +21,7 @@ #include <linux/pci.h> #include <linux/ioport.h> #include <linux/io.h> +#include <linux/security.h> #include <asm/byteorder.h> #include <asm/unaligned.h> @@ -1575,6 +1576,10 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj, struct pcmcia_socket *s; int error; + error = security_locked_down(LOCKDOWN_PCMCIA_CIS); + if (error) + return error; + s = to_socket(container_of(kobj, struct device, kobj)); if (off) |