Message ID | 20190404003249.14356-17-matthewgarrett@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-security-module-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57ECD922 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 4 Apr 2019 00:34:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42AA1285A6 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 4 Apr 2019 00:34:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 373FD2871E; Thu, 4 Apr 2019 00:34:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2468285A6 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 4 Apr 2019 00:34:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727280AbfDDAdj (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Wed, 3 Apr 2019 20:33:39 -0400 Received: from mail-vk1-f201.google.com ([209.85.221.201]:34376 "EHLO mail-vk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726412AbfDDAdi (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Wed, 3 Apr 2019 20:33:38 -0400 Received: by mail-vk1-f201.google.com with SMTP id y82so446088vkd.1 for <linux-security-module@vger.kernel.org>; Wed, 03 Apr 2019 17:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=4G8m95jwtwdfjA5z7EFk9aUl9ztD0RqYosPZp4xmjEc=; b=Crz5pwAhhGfJ0QYGLtrhjgTwc28guJi6H/Id0SKwWnJIKYGPPm2VUMcicPe48h/eOT UcmCpUt3C0UrJ4X77h+cvV41W2pqvyneD2rLGVq1W8zMb6190GtxQWQ3ncoa3Vx+D5HJ mgC7r5/geCa4OpN5ejJlsGjspfTd0+y6LC4AE7j9RvCqR2HKzcRq18fSSnEagdIIAEad 0yVCAn6iJ70IVGzVf7QUDOATfxcDtENqwBx1POTRzmWqsvLuikbJYNFT6+TJyiLOgo0Z DdQ1SjRYn09pSaYBc8g+Slk8tipFCdyY/lz7hBqGwUaED4rQA2H1saWZEAXRPPFV3INX N5uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=4G8m95jwtwdfjA5z7EFk9aUl9ztD0RqYosPZp4xmjEc=; b=uhvqiTbaJH4pRYHYDmZiFzgyZx3yfw8Q1Uc+gkxHdIRP8CuUis7S4C3v3F0uv9cQ3H a9oR562UsMd4enhpuPekpzLhRit9KKlV3HJu0jCAfTtyo0cNxdAF+/DfCbqZlGMnYShD AiRQkqjaWhm5GjAO70TANM8jxJNgm3u/EZn1K2E182vJfqO53amoZzT06ecx7ivZMJah khv4o5OSKohwsppd2D0N4wGK5kQojmIQW6NejkLh1PpWx6rNkkX8kl7Eit8M1pqz3BYj +wXE7GIbL4Izxg4q+NUreV05WFxSYVZeDvvnkeF8jzNehV/yyYpLr3CPWeRbKxz9yILD mbsQ== X-Gm-Message-State: APjAAAXeNVF4Y1ja2HaaeoDs5jo1sau8gVYvmITAFsh7Jv0px9uAsZyv 10FjKZg8gdAqbJONKlTPAWHmOhK7XGBixOdJkRUzhA== X-Google-Smtp-Source: APXvYqwCJbB1Ph8ibXeXAEcWqJMS+HDQJVi4XlZx7IvM+zE0X/miIe9mQ2NXG8cXGUbuQbUvq6zUtkUVOg0BqqaypiQ8iA== X-Received: by 2002:a1f:3c0a:: with SMTP id j10mr367978vka.17.1554338017457; Wed, 03 Apr 2019 17:33:37 -0700 (PDT) Date: Wed, 3 Apr 2019 17:32:38 -0700 In-Reply-To: <20190404003249.14356-1-matthewgarrett@google.com> Message-Id: <20190404003249.14356-17-matthewgarrett@google.com> Mime-Version: 1.0 References: <20190404003249.14356-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog Subject: [PATCH V32 16/27] Prohibit PCMCIA CIS storage when the kernel is locked down From: Matthew Garrett <matthewgarrett@google.com> To: jmorris@namei.org Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-api@vger.kernel.org, luto@kernel.org, Dominik Brodowski <linux@dominikbrodowski.net>, Matthew Garrett <mjg59@google.com> Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: <linux-security-module.vger.kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Lockdown patches for 5.2
|
expand
|
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index ac0672b8dfca..9e23300a55e5 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -1578,6 +1578,10 @@ 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", + LOCKDOWN_INTEGRITY)) + return -EPERM; + s = to_socket(container_of(kobj, struct device, kobj)); if (off)