From patchwork Sat Jul 9 18:19:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= X-Patchwork-Id: 9222185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 604A760467 for ; Sat, 9 Jul 2016 23:08:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53D8E28834 for ; Sat, 9 Jul 2016 23:08:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45A5D2883F; Sat, 9 Jul 2016 23:08:19 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 AE3E228834 for ; Sat, 9 Jul 2016 23:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756865AbcGIXIR (ORCPT ); Sat, 9 Jul 2016 19:08:17 -0400 Received: from 17.mo3.mail-out.ovh.net ([87.98.178.58]:60610 "EHLO 17.mo3.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756658AbcGIXIR (ORCPT ); Sat, 9 Jul 2016 19:08:17 -0400 X-Greylist: delayed 14999 seconds by postgrey-1.27 at vger.kernel.org; Sat, 09 Jul 2016 19:08:17 EDT Received: from player690.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id 4802B1000B84 for ; Sat, 9 Jul 2016 20:19:58 +0200 (CEST) Received: from localhost (ns3096276.ip-94-23-54.eu [94.23.54.103]) (Authenticated sender: postmaster@digikod.net) by player690.ha.ovh.net (Postfix) with ESMTPSA id 11C6754006C; Sat, 9 Jul 2016 20:19:46 +0200 (CEST) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Mimi Zohar , Kees Cook , "Luis R . Rodriguez" , Rusty Russell , Linus Torvalds , Greg Kroah-Hartman , stable@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH v1] module: Fully remove the kernel_module_from_file hook Date: Sat, 9 Jul 2016 20:19:15 +0200 Message-Id: <1468088355-18484-1-git-send-email-mic@digikod.net> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 4633359592047290647 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeltddrfeefgdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Fixes: a1db74209483 ("module: replace copy_module_from_fd with kernel version") Signed-off-by: Mickaël Salaün Cc: Mimi Zohar Cc: Kees Cook Cc: Luis R. Rodriguez Cc: Rusty Russell Cc: Linus Torvalds Cc: Greg Kroah-Hartman Acked-by: Kees Cook Acked-by: James Morris --- include/linux/lsm_hooks.h | 1 - include/linux/security.h | 1 - 2 files changed, 2 deletions(-) diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 7ae397669d8b..58c777ec8bcf 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h @@ -1455,7 +1455,6 @@ union security_list_options { int (*kernel_act_as)(struct cred *new, u32 secid); int (*kernel_create_files_as)(struct cred *new, struct inode *inode); int (*kernel_module_request)(char *kmod_name); - int (*kernel_module_from_file)(struct file *file); int (*kernel_read_file)(struct file *file, enum kernel_read_file_id id); int (*kernel_post_read_file)(struct file *file, char *buf, loff_t size, enum kernel_read_file_id id); diff --git a/include/linux/security.h b/include/linux/security.h index 14df373ff2ca..2b8c7d2a3fd8 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -307,7 +307,6 @@ void security_transfer_creds(struct cred *new, const struct cred *old); int security_kernel_act_as(struct cred *new, u32 secid); int security_kernel_create_files_as(struct cred *new, struct inode *inode); int security_kernel_module_request(char *kmod_name); -int security_kernel_module_from_file(struct file *file); int security_kernel_read_file(struct file *file, enum kernel_read_file_id id); int security_kernel_post_read_file(struct file *file, char *buf, loff_t size, enum kernel_read_file_id id);