From patchwork Tue Sep 11 16:41:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Casey Schaufler X-Patchwork-Id: 10595915 Return-Path: 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 ABAAA6CB for ; Tue, 11 Sep 2018 16:49:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97DBF28CF9 for ; Tue, 11 Sep 2018 16:49:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B01029890; Tue, 11 Sep 2018 16:49:04 +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=-4.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,NO_RDNS_DOTCOM_HELO,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from ucol19pa09.eemsg.mail.mil (ucol19pa09.eemsg.mail.mil [214.24.24.82]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8860B28CF9 for ; Tue, 11 Sep 2018 16:49:03 +0000 (UTC) X-EEMSG-check-008: 767194491|UCOL19PA09_EEMSG_MP7.csd.disa.mil X-IronPort-AV: E=Sophos;i="5.53,361,1531785600"; d="scan'208";a="767194491" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by ucol19pa09.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 11 Sep 2018 16:49:03 +0000 X-IronPort-AV: E=Sophos;i="5.53,361,1531785600"; d="scan'208";a="18080315" IronPort-PHdr: 9a23:QvPUdRwW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l1 X-IPAS-Result: A2DUCAACrpdb/wHyM5BcGwEBAQEDAQEBCQEBAYMkJwOBCFwojAVfiz+BYIMGk1sUgWInEwGFBINIITQYAQIBAQEBAQECAWwcDII1JIJgAwMBAiQTBgEBDCALAQIDCQEBQAgIAwEtFAERBgEHBQYCAQEBGASDAIFqAxUDmg6KHIFqM4J1AQEFgQQBAWqCPgOCUAgXiTOBGxeCAIESJ4c2ARIBhXeIUIR3PzCNVAmCCIcthkcdWGiHNQiFc44Yhzc4ZHFNIxU7gmyCGQwXegEOgjyKHAFVT3sBAYphgjwBAQ Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 11 Sep 2018 16:49:01 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus.infosec.tycho.ncsc.mil [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w8BGmprH023192; Tue, 11 Sep 2018 12:48:57 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id w8BGfnNw031924 for ; Tue, 11 Sep 2018 12:41:49 -0400 Received: from goalie.tycho.ncsc.mil (goalie.infosec.tycho.ncsc.mil [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w8BGflST023054 for ; Tue, 11 Sep 2018 12:41:49 -0400 IronPort-PHdr: 9a23:TVnSuRC4L0Ij5HtlhOerUyQJPHJ1sqjoPgMT9pssgq5PdaLm5Zn5IUjD/q820Q30ZanwsNl8orOM9a3tXHcPp5OIsXREdZ1IBFcekctDuQsmDYaeDFHjaubwZnkxFd9PRXd+9HGyLEZRFdy7bFSUqXq3vnYJAhuqEw1zK6zuH5LKycG+1uS84ZrWNg5BnzesSah5LByrowHcrIwdiM1pLaNiggDRrC5ufOJbjXhtOUrVnxv44ZKo+4V/9i1Lp/8739VHV6TxJPxkCOYHSj8hNXsw/ovuvBjHCw2Cvz0NW2URlVxDBA2WpB35X5KkqiLhraI9wyiVO8TqUKo5ESqv9aZlSRLkyW8HOjc1/XuRi5lYnatbpxXnrBt6zg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1CVAQACrpdbly0bGNZcHAEBAQQBAQoBAYMkJ4FnKINyiBNfiz+BYIMGk1uBeoR3AkKDSCE0GAECAQEBAQEBAhQBAQEBAQYYBkyFRQMDIwQZAQE3AQ8lAiYCAkUSBgEMBgIBAYMdgWoDFQOaDoocb3szgnUBAQWBBAEBaoI+A4JQCBd0iD+BGxeCAIESJ4pqgleIUIR3PzCNVAmCCIcthkcdWGiHNQiFc44YhzeCDU0jFTuCbIIZDA4JegEOgjyKHAFVT44aAQE X-IPAS-Result: A1CVAQACrpdbly0bGNZcHAEBAQQBAQoBAYMkJ4FnKINyiBNfiz+BYIMGk1uBeoR3AkKDSCE0GAECAQEBAQEBAhQBAQEBAQYYBkyFRQMDIwQZAQE3AQ8lAiYCAkUSBgEMBgIBAYMdgWoDFQOaDoocb3szgnUBAQWBBAEBaoI+A4JQCBd0iD+BGxeCAIESJ4pqgleIUIR3PzCNVAmCCIcthkcdWGiHNQiFc44YhzeCDU0jFTuCbIIZDA4JegEOgjyKHAFVT44aAQE X-IronPort-AV: E=Sophos;i="5.53,360,1531800000"; d="scan'208";a="366469" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 11 Sep 2018 12:41:46 -0400 IronPort-PHdr: 9a23:BKEetxOXqeHK6vbo+wYl6mtUPXoX/o7sNwtQ0KIMzox0K//7psbcNUDSrc9gkEXOFd2Cra4c1KyO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJs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hkgdWGiHNwiFdo4jhzeCDU0jFTuCbIIZDA4JegEOgjyKHAFVT45eAQE X-IPAS-Result: A0DSAABg75dbly0bGNZbHQEBBQELAYMkJ4FnKINyiBNfi0SEZpNhgXqEdwJCgx0hNBgBAgEBAQEBAQIBEwEBAQEBBhgGTAyCNSSCYAMDIwQZAQE3AQ8lAiYCAkUSBgEMBgIBAYMdgWoDFQOaSoocb3szgnUBAQWBBAEBaoI8A4JRCBd0iEGBGxeCAIESJ4pqgleIUIR3QDCNXAmCCYcvhkgdWGiHNwiFdo4jhzeCDU0jFTuCbIIZDA4JegEOgjyKHAFVT45eAQE X-IronPort-AV: E=Sophos;i="5.53,361,1531785600"; d="scan'208";a="15730781" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from updc3cpa06.eemsg.mail.mil ([214.24.27.45]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 11 Sep 2018 16:41:45 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;ad8121c1-28ba-422c-8bc9-09423e42f9f8 Authentication-Results: UPDC3CPA12.eemsg.mail.mil; spf=None smtp.pra=casey@schaufler-ca.com; spf=None smtp.mailfrom=casey@schaufler-ca.com; spf=None smtp.helo=postmaster@sonic304-27.consmr.mail.ne1.yahoo.com; dkim=pass (signature verified) header.i=@yahoo.com X-EEMSG-check-008: 50003818|UPDC3CPA12_EEMSG_MP28.csd.disa.mil X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 66.163.191.153 X-EEMSG-check-002: true IronPort-PHdr: 9a23:M2VGdhToKoc/92tkYjvcvVJRVNpsv+yvbD5Q0YIujvd0So/mwa67ZxeEt8tkgFKBZ4jH8fUM07OQ7/i/HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9wIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm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gYwGAECAQEBAQEBAQEBEwEBAQoLCQgpIwyCNSSCYAMDIwQZAQE3AQ8lAiYCAkUSBgEMBgIBAYMdgWoDFZpMihxvezOCdQEBBYEEAQFqgjwDglEIF3SIQYEyggCBEieKaoJXiFCEd0AwjVwJggmHL4ZIHVhohzcIhXaOI4c3gg1NIxU7gmyCGQwOCXoBDoI8ihwBVR8wjl4BAQ Received: from sonic304-27.consmr.mail.ne1.yahoo.com ([66.163.191.153]) by UPDC3CPA12.eemsg.mail.mil with ESMTP; 11 Sep 2018 16:41:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1536684099; bh=JRp04NDfqBc6dzgHOds8dWHSwGv3gnGCwykLrhfMtq8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=or0OfgYBEKVXc/uy2zuUOGEQ3PYDcVaC5fwIWDMu4p3NV6nLRZaLle/OcEbC9MYEPSjZ5/iAahhUSMzlORqIEANCpD0sxQliF+Hya5JX9SGrN6kWStuTcO7IBU/HUjBQOScjmvQqrt5fIx2JJeMu8cfviPzZjCxCi8spN8iZPhivVFIpNVIDm+rZd2ITe0QOaxkxxmGhkOqZhOV1hCDrL5D5L9JCHUdoTpCoN3VKKF+xjIaQd9AoIK4fGv8YSFbKo2t5bbBhUShBL+NZGgMNoLZUQ4i1RUCPhp9VudIoh3t99e1TacOssoSAdLgbQVGtexW9AKio1CozTANjp+a1yA== X-YMail-OSG: XR25d9kVM1mvZl5xv5SfxJw7LUG503IiSTPmkB5mti3sV7bT1vDVegOF_HxsvNS U2NgDzzuOkg5P6RUZIxLt2s2TNYWsye6U8IVyDsOkkKry_a.AZsN3Z6_FjLhTX3ft9xXjJp..OmG ZJVfDJJhca_EfK7Ou8fvvq2wNWmJsu1TN9B8ZEpRdwlU_82BXull0.6CHD2HAeLHFiZxZiWn6hxX atCoXR65KkLb7tSxTu6zmdsJYkKoYOIM9MFdiSYkM7ksO9iQcJpaN1FK6EJY73wouIduK6UbbHzv 2WQO4JTHOaSoy60aU5ZUSf1UtRf7b9r45Yu9EpGuQTETUBPn9MSEHSu5WziUF8k4g1kLWyVZU3G. THSIgmLLZozF0y1TRXsjj3kpGXjdfFHOiL9q6NfI6Z5QUzhOM8oY2CsV_oaNCDcRmF5sgxpoKGlJ Y7h3Qc4OB0Tv8kU6PtL3JE_zV2VEuxAQ.YQyHKzgDW1scyS9YzcLEJV.93KKkjxR4L3n0Dec5E8T Nf6KL2zZx8H31zApG1ssnggO9DwDuLzNrLKrJWijpvRDp8IkFl3ZaWuscQKZNP8p.7ZzGdBAJjys ssbc9Jtj45..LLEWk8GQuIS0MF1Czh0Effnb5ELv.kgMnyMsjIieu9polyOyPgtelImS8SVjY_QG qZukj16IIIWTe0FRAIWbIeDuHLv9V6C4U8VKr5HTxkffV1C.SxlADcSc.bv9cnlhJoEvvGhBP6Id g1_Sb52IytwkXtxzxZyG4U_s8_TGkbIZmdasCpwNzHCiFX4yelXT.J96Z67JAsrj13Vl5LWp4HOz .CL9TrGFnR974KOI5o30Bb.HN8g3av4IUPRlUNCHlRQ8tePipK47t96vOPck3.OccDzto0gS8l4s JFruQcl5GWIHG1hNnkljLJKbSs2Zeqb_mZaMbnpW02B1RUQaDuBR7Uz0knIjUJpPAntjxl8nVnkJ mJgKK30KH7eu7.PgmBiU1RiK_jzQbRrU7Xl7YZFZQX9_l7lFEWUxA9k9PI1pa.v3gymPVqblx1NL kGVsnoOP.Q.ErmM4tCPKxxQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Tue, 11 Sep 2018 16:41:39 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.102]) ([67.169.65.224]) by smtp426.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f55e078a0b8b642caa1831ba3afc4dc8; Tue, 11 Sep 2018 16:41:36 +0000 (UTC) To: LSM , James Morris , LKLM , SE Linux , John Johansen , Kees Cook , Tetsuo Handa , Paul Moore , Stephen Smalley , "linux-fsdevel@vger.kernel.org" , Alexey Dobriyan References: X-EEMSG-check-009: 444-444 From: Casey Schaufler Message-ID: Date: Tue, 11 Sep 2018 09:41:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mailman-Approved-At: Tue, 11 Sep 2018 12:45:04 -0400 Subject: [PATCH 01/10] procfs: add smack subdir to attrs X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Cc: "Schaufler, Casey" Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Back in 2007 I made what turned out to be a rather serious mistake in the implementation of the Smack security module. The SELinux module used an interface in /proc to manipulate the security context on processes. Rather than use a similar interface, I used the same interface. The AppArmor team did likewise. Now /proc/.../attr/current will tell you the security "context" of the process, but it will be different depending on the security module you're using. This patch provides a subdirectory in /proc/.../attr for Smack. Smack user space can use the "current" file in this subdirectory and never have to worry about getting SELinux attributes by mistake. Programs that use the old interface will continue to work (or fail, as the case may be) as before. The proposed S.A.R.A security module is dependent on the mechanism to create its own attr subdirectory. The original implementation is by Kees Cook. Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook --- Documentation/admin-guide/LSM/index.rst | 13 +++-- fs/proc/base.c | 64 +++++++++++++++++++++---- fs/proc/internal.h | 1 + include/linux/security.h | 15 ++++-- security/security.c | 24 ++++++++-- 5 files changed, 96 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/LSM/index.rst b/Documentation/admin-guide/LSM/index.rst index c980dfe9abf1..9842e21afd4a 100644 --- a/Documentation/admin-guide/LSM/index.rst +++ b/Documentation/admin-guide/LSM/index.rst @@ -17,9 +17,8 @@ MAC extensions, other extensions can be built using the LSM to provide specific changes to system operation when these tweaks are not available in the core functionality of Linux itself. -Without a specific LSM built into the kernel, the default LSM will be the -Linux capabilities system. Most LSMs choose to extend the capabilities -system, building their checks on top of the defined capability hooks. +The Linux capabilities modules will always be included. This may be +followed by any number of "minor" modules and at most one "major" module. For more details on capabilities, see ``capabilities(7)`` in the Linux man-pages project. @@ -30,6 +29,14 @@ order in which checks are made. The capability module will always be first, followed by any "minor" modules (e.g. Yama) and then the one "major" module (e.g. SELinux) if there is one configured. +Process attributes associated with "major" security modules should +be accessed and maintained using the special files in ``/proc/.../attr``. +A security module may maintain a module specific subdirectory there, +named after the module. ``/proc/.../attr/smack`` is provided by the Smack +security module and contains all its special files. The files directly +in ``/proc/.../attr`` remain as legacy interfaces for modules that provide +subdirectories. + .. toctree:: :maxdepth: 1 diff --git a/fs/proc/base.c b/fs/proc/base.c index ccf86f16d9f0..bd2dd85310fe 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -140,9 +140,13 @@ struct pid_entry { #define REG(NAME, MODE, fops) \ NOD(NAME, (S_IFREG|(MODE)), NULL, &fops, {}) #define ONE(NAME, MODE, show) \ - NOD(NAME, (S_IFREG|(MODE)), \ + NOD(NAME, (S_IFREG|(MODE)), \ NULL, &proc_single_file_operations, \ { .proc_show = show } ) +#define ATTR(LSM, NAME, MODE) \ + NOD(NAME, (S_IFREG|(MODE)), \ + NULL, &proc_pid_attr_operations, \ + { .lsm = LSM }) /* * Count the number of hardlinks for the pid_entry table, excluding the . @@ -2503,7 +2507,7 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, if (!task) return -ESRCH; - length = security_getprocattr(task, + length = security_getprocattr(task, PROC_I(inode)->op.lsm, (char*)file->f_path.dentry->d_name.name, &p); put_task_struct(task); @@ -2552,7 +2556,9 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, if (rv < 0) goto out_free; - rv = security_setprocattr(file->f_path.dentry->d_name.name, page, count); + rv = security_setprocattr(PROC_I(inode)->op.lsm, + file->f_path.dentry->d_name.name, page, + count); mutex_unlock(¤t->signal->cred_guard_mutex); out_free: kfree(page); @@ -2566,13 +2572,53 @@ static const struct file_operations proc_pid_attr_operations = { .llseek = generic_file_llseek, }; +#define LSM_DIR_OPS(LSM) \ +static int proc_##LSM##_attr_dir_iterate(struct file *filp, \ + struct dir_context *ctx) \ +{ \ + return proc_pident_readdir(filp, ctx, \ + LSM##_attr_dir_stuff, \ + ARRAY_SIZE(LSM##_attr_dir_stuff)); \ +} \ +\ +static const struct file_operations proc_##LSM##_attr_dir_ops = { \ + .read = generic_read_dir, \ + .iterate = proc_##LSM##_attr_dir_iterate, \ + .llseek = default_llseek, \ +}; \ +\ +static struct dentry *proc_##LSM##_attr_dir_lookup(struct inode *dir, \ + struct dentry *dentry, unsigned int flags) \ +{ \ + return proc_pident_lookup(dir, dentry, \ + LSM##_attr_dir_stuff, \ + ARRAY_SIZE(LSM##_attr_dir_stuff)); \ +} \ +\ +static const struct inode_operations proc_##LSM##_attr_dir_inode_ops = { \ + .lookup = proc_##LSM##_attr_dir_lookup, \ + .getattr = pid_getattr, \ + .setattr = proc_setattr, \ +} + +#ifdef CONFIG_SECURITY_SMACK +static const struct pid_entry smack_attr_dir_stuff[] = { + ATTR("smack", "current", 0666), +}; +LSM_DIR_OPS(smack); +#endif + static const struct pid_entry attr_dir_stuff[] = { - REG("current", S_IRUGO|S_IWUGO, proc_pid_attr_operations), - REG("prev", S_IRUGO, proc_pid_attr_operations), - REG("exec", S_IRUGO|S_IWUGO, proc_pid_attr_operations), - REG("fscreate", S_IRUGO|S_IWUGO, proc_pid_attr_operations), - REG("keycreate", S_IRUGO|S_IWUGO, proc_pid_attr_operations), - REG("sockcreate", S_IRUGO|S_IWUGO, proc_pid_attr_operations), + ATTR(NULL, "current", 0666), + ATTR(NULL, "prev", 0444), + ATTR(NULL, "exec", 0666), + ATTR(NULL, "fscreate", 0666), + ATTR(NULL, "keycreate", 0666), + ATTR(NULL, "sockcreate", 0666), +#ifdef CONFIG_SECURITY_SMACK + DIR("smack", 0555, + proc_smack_attr_dir_inode_ops, proc_smack_attr_dir_ops), +#endif }; static int proc_attr_dir_readdir(struct file *file, struct dir_context *ctx) diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 5185d7f6a51e..d4f9989063d0 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -81,6 +81,7 @@ union proc_op { int (*proc_show)(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task); + const char *lsm; }; struct proc_inode { diff --git a/include/linux/security.h b/include/linux/security.h index 75f4156c84d7..418de5d20ffb 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -390,8 +390,10 @@ int security_sem_semctl(struct kern_ipc_perm *sma, int cmd); int security_sem_semop(struct kern_ipc_perm *sma, struct sembuf *sops, unsigned nsops, int alter); void security_d_instantiate(struct dentry *dentry, struct inode *inode); -int security_getprocattr(struct task_struct *p, char *name, char **value); -int security_setprocattr(const char *name, void *value, size_t size); +int security_getprocattr(struct task_struct *p, const char *lsm, char *name, + char **value); +int security_setprocattr(const char *lsm, const char *name, void *value, + size_t size); int security_netlink_send(struct sock *sk, struct sk_buff *skb); int security_ismaclabel(const char *name); int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen); @@ -1139,15 +1141,18 @@ static inline int security_sem_semop(struct kern_ipc_perm *sma, return 0; } -static inline void security_d_instantiate(struct dentry *dentry, struct inode *inode) +static inline void security_d_instantiate(struct dentry *dentry, + struct inode *inode) { } -static inline int security_getprocattr(struct task_struct *p, char *name, char **value) +static inline int security_getprocattr(struct task_struct *p, const char *lsm, + char *name, char **value) { return -EINVAL; } -static inline int security_setprocattr(char *name, void *value, size_t size) +static inline int security_setprocattr(const char *lsm, char *name, + void *value, size_t size) { return -EINVAL; } diff --git a/security/security.c b/security/security.c index 736e78da1ab9..3dfe75d0d373 100644 --- a/security/security.c +++ b/security/security.c @@ -1288,14 +1288,30 @@ void security_d_instantiate(struct dentry *dentry, struct inode *inode) } EXPORT_SYMBOL(security_d_instantiate); -int security_getprocattr(struct task_struct *p, char *name, char **value) +int security_getprocattr(struct task_struct *p, const char *lsm, char *name, + char **value) { - return call_int_hook(getprocattr, -EINVAL, p, name, value); + struct security_hook_list *hp; + + hlist_for_each_entry(hp, &security_hook_heads.getprocattr, list) { + if (lsm != NULL && strcmp(lsm, hp->lsm)) + continue; + return hp->hook.getprocattr(p, name, value); + } + return -EINVAL; } -int security_setprocattr(const char *name, void *value, size_t size) +int security_setprocattr(const char *lsm, const char *name, void *value, + size_t size) { - return call_int_hook(setprocattr, -EINVAL, name, value, size); + struct security_hook_list *hp; + + hlist_for_each_entry(hp, &security_hook_heads.setprocattr, list) { + if (lsm != NULL && strcmp(lsm, hp->lsm)) + continue; + return hp->hook.setprocattr(name, value, size); + } + return -EINVAL; } int security_netlink_send(struct sock *sk, struct sk_buff *skb)