Message ID | 20190306235913.6631-19-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 8B77E139A for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 7 Mar 2019 00:01:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76DD12E9F5 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 7 Mar 2019 00:01:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 696FB2EF72; Thu, 7 Mar 2019 00:01:11 +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 690002E9F5 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 7 Mar 2019 00:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726101AbfCGABJ (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Wed, 6 Mar 2019 19:01:09 -0500 Received: from mail-qt1-f202.google.com ([209.85.160.202]:49322 "EHLO mail-qt1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbfCGAAN (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Wed, 6 Mar 2019 19:00:13 -0500 Received: by mail-qt1-f202.google.com with SMTP id q11so13383324qtj.16 for <linux-security-module@vger.kernel.org>; Wed, 06 Mar 2019 16:00:13 -0800 (PST) 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=EeAsNLooacMCIyQQG8kjyYl9LfYTYq2OlHNVaSq+jF4=; b=BXibPNAU2kBLKi0tjOaBoATPK4GSG9rdLOziADGyltDJLflexEotgn/YIOIEl1Fm1H yMKiAZuRKAYyc2wi9Z9d4o35i6BvJDlVbS0M3iQvUIZits5qZwr7R60IUQGPdO6d5eWg oqY4UJoLQdmZJ2B0X2IxvA0M9/CXZx0HcS1UqVad8pRlnNi2MHHBlTg276gQPOoUjJVU jXR9xzzJ/1LnMTEgqx6l/1wlLediq2tk6EewVxCYv9Ajdlki6r3EAt3+eXpztFNwMs93 3/hzDEIcglR4a8m9b8Zr9hyDIA0YZdse4rBnWiIpPApIuSjtOjoQUODVtRMhiygVCjIw lwFw== 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=EeAsNLooacMCIyQQG8kjyYl9LfYTYq2OlHNVaSq+jF4=; b=PdfzB4fp+Kgawjb++Fc0ywleAi1lIUDQ3QnXFl0XB8XU1g5n549/1Ev8VQ/pOKfK6y pRP40xziz4sWnehUDOnXJOJ/JW5VwDDQXo1GC8VYxkHhfVlc6g3F7n6zi4qE2cMzYxS1 FnDVpFKbsQYqd+ufBKP9eyptSY3O8OIcZDPQLUNbRh7y0TCoYa0xAixI4a5l1ERpGra6 CEYCPLq3oi3z5Bpzz4aCRcL1z4Sqy3hgUSRWYETj62jn1ls8b4zcBoY+wR9xM8N7AqKc MnC01OsHh0riP9joGOe9kHAbrjmwLkV2d29Q14s08P4azldVuyUphp4sp3pOfuU5Mgc/ DLbQ== X-Gm-Message-State: APjAAAV4KNf2pWlXIHmJj+WT5PiKdgmYkm0Dikyxt1y9xfajDMfMUTj5 pmY3ZfcZf5NZ9KkhjqocfV074Egl9p90PTpYo33a0Q== X-Google-Smtp-Source: APXvYqyyHqurNEQcATvX9vuJ/DA66of6NpknXBwulCWr+CZ2zas04bUFP1eObLNYb/FpEk+eXfimYgny1hYZiiVpm2mLag== X-Received: by 2002:a0c:b10f:: with SMTP id q15mr6331977qvc.0.1551916812836; Wed, 06 Mar 2019 16:00:12 -0800 (PST) Date: Wed, 6 Mar 2019 15:59:04 -0800 In-Reply-To: <20190306235913.6631-1-matthewgarrett@google.com> Message-Id: <20190306235913.6631-19-matthewgarrett@google.com> Mime-Version: 1.0 References: <20190306235913.6631-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.21.0.352.gf09ad66450-goog Subject: [PATCH 18/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 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 |
[PULL,REQUEST] Kernel lockdown patches for 5.2
|
expand
|
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)