Message ID | 20190404003249.14356-14-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 2C41417E1 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 4 Apr 2019 00:33:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C20B28913 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 4 Apr 2019 00:33:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 102882893D; Thu, 4 Apr 2019 00:33:31 +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 B69BD28913 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 4 Apr 2019 00:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726978AbfDDAda (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Wed, 3 Apr 2019 20:33:30 -0400 Received: from mail-vk1-f202.google.com ([209.85.221.202]:47892 "EHLO mail-vk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbfDDAd2 (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Wed, 3 Apr 2019 20:33:28 -0400 Received: by mail-vk1-f202.google.com with SMTP id l11so433781vkl.14 for <linux-security-module@vger.kernel.org>; Wed, 03 Apr 2019 17:33:28 -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=aQw0KGeWmvPzPQJC9aCiMXHo5RCdIiAFpbvhdBtqfOA=; b=HrnnfxtEOmZgJzYuk+1NGAEVH3FcUFjd6/CBWrK13gcpvb388nqYaCopTOLyHeiL1d BKx8619edH1V2dmHSMJXG+k3mIUlblQzV2u/zO0e4fFTXaPhYH3qkk2oBZtOPkDf/pMH c54kprWqcu9bnxwX2huhYfWI0NK19dx+cOTVdTShh6O9RpDn5d1CRWLTj74UYSVkLfjk m9UNjHC3gaOX9OtPbO5zNNbbdyPtrCAFi3EKo2W41SCPOU88rp2S8NL6uCUmQdKvJubH 3qMyUCCEogMiavG6CtQUFSXB3/s/iNE8LHMbqsYvZCIifSgPCsE7EMCoYzlvMPlip49W ZGow== 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=aQw0KGeWmvPzPQJC9aCiMXHo5RCdIiAFpbvhdBtqfOA=; b=jkR4zNdgN8DKGb1KvtqSMWb1GSFVWZSBYTvAd3JiWrJJ0aDSYHTegVErtbfJU1VCKU BF2B/k7VuQo3bUq5z3Pk9Ta6t8CsHR5VB+fo6/TIP/8J8v7Pk44A/9+WBd8UiQHmGdIe tLPXhH6mK0Z0hhvQcR2JA5r6qcxBbEF5pKXVmcwzVhviCtUSMZxYJayPUPVP1C2nJ42y 7mCWSfmM47kg7fLiJE6lBArRuKnqZwV+RHOrRCNwUIoaPym95Kn21bzegRxn22Glu07D oHc9j6DMkH5iR/ywagbsyJHZZHgzVw/Hn7j76KUCNdirmjMmVRXEJXxAKpeDmAntkJLY p6PQ== X-Gm-Message-State: APjAAAWevtz9SHDLpIsUxJavPeNda3EXYq2/hdTWxLSoVxUCF51LQfKx qIlyfFU24GfRU3i/FRfmwJZGDbBsBqRldSfAheBVFQ== X-Google-Smtp-Source: APXvYqwn9uDV4QCW3Ysw0OeGe8fuj1O+mbnQ+p5+YyWGjXPdgos0oC1yx4GJVCZSHMnrpHBueWMml8CLMI4YTuAGQGSUpA== X-Received: by 2002:a1f:9010:: with SMTP id s16mr372950vkd.12.1554338007705; Wed, 03 Apr 2019 17:33:27 -0700 (PDT) Date: Wed, 3 Apr 2019 17:32:35 -0700 In-Reply-To: <20190404003249.14356-1-matthewgarrett@google.com> Message-Id: <20190404003249.14356-14-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 13/27] ACPI: Limit access to custom_method 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, Matthew Garrett <mjg59@srcf.ucam.org>, Matthew Garrett <mjg59@google.com>, linux-acpi@vger.kernel.org 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/acpi/custom_method.c b/drivers/acpi/custom_method.c index 4451877f83b6..37de3cd84493 100644 --- a/drivers/acpi/custom_method.c +++ b/drivers/acpi/custom_method.c @@ -29,6 +29,9 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf, struct acpi_table_header table; acpi_status status; + if (kernel_is_locked_down("ACPI custom methods", LOCKDOWN_INTEGRITY)) + return -EPERM; + if (!(*ppos)) { /* parse the table header to get the table length */ if (count <= sizeof(struct acpi_table_header))