[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190325220954.29054-18-matthewgarrett@google.com>
Date: Mon, 25 Mar 2019 15:09:44 -0700
From: Matthew Garrett <matthewgarrett@...gle.com>
To: jmorris@...ei.org
Cc: linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, dhowells@...hat.com,
Dominik Brodowski <linux@...inikbrodowski.net>,
linux-pcmcia@...ts.infradead.org,
Matthew Garrett <matthewgarrett@...gle.com>
Subject: [PATCH 17/27] Prohibit PCMCIA CIS storage when the kernel is locked down
From: David Howells <dhowells@...hat.com>
Prohibit replacement of the PCMCIA Card Information Structure when the
kernel is locked down.
Suggested-by: Dominik Brodowski <linux@...inikbrodowski.net>
Signed-off-by: David Howells <dhowells@...hat.com>
cc: linux-pcmcia@...ts.infradead.org
Signed-off-by: Matthew Garrett <matthewgarrett@...gle.com>
---
drivers/pcmcia/cistpl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index ac0672b8dfca..8adf092d0e18 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -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)
--
2.21.0.392.gf8f6787159e-goog
Powered by blists - more mailing lists