From patchwork Thu Mar 8 01:53:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Casey Schaufler X-Patchwork-Id: 10268015 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 85FA660211 for ; Thu, 8 Mar 2018 13:02:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74D1E29906 for ; Thu, 8 Mar 2018 13:02:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69AB829911; Thu, 8 Mar 2018 13:02:03 +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=-3.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, NO_RDNS_DOTCOM_HELO,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from UCOL19PA10.eemsg.mail.mil (ucol19pa10.eemsg.mail.mil [214.24.24.83]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ED8629910 for ; Thu, 8 Mar 2018 13:02:02 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.47,441,1515456000"; d="scan'208";a="462374608" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by UCOL19PA10.eemsg.mail.mil with ESMTP; 08 Mar 2018 13:02:01 +0000 X-IronPort-AV: E=Sophos;i="5.47,441,1515456000"; d="scan'208";a="10307297" IronPort-PHdr: =?us-ascii?q?9a23=3Aj7LdoxTEF95Jxsdpz/YrfXrczdpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa6/YxSFt8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1yc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?= =?us-ascii?q?YZ4LCXuyI82w3thxnYPiW2RZ9FG9HVMLw9WmdgaXb1Dn2g1Qz0sXq2S9mSSk1z?= =?us-ascii?q?x0jy0prq2H0SPS2evicAQIOnVXRGhiilfhOpO0gMwbXEe2aQgpiBql6lzgy6hd?= =?us-ascii?q?uqt/M3HZQV1UcCjuM2FiTqywu6KYY8FS9ZwlqipXUOGzYFyATL7yvQca2Tv5H2?= =?us-ascii?q?RC3DA7ay2qupLhkhxhhmKdNnFzrGHFecxr3hff4tvcRPBU3jUcQil0kz/XCUag?= =?us-ascii?q?P9Ox59Wbi4/DsvyiV2KmTpBSfzPkzYectCSl/21qGgayn+6tld39Cgc6zCr728?= =?us-ascii?q?NtVSXSoxb2epPr2LiiMeJ7YkloA0fx69R7Go5ijoswg4sQ1WIGiZWV+noHl2jz?= =?us-ascii?q?PM5f2aL/anoCXyQLw9nP7Ajiwk1jIWqDx5jlWXWF3sthe966b3sS2iI89MBKFL?= =?us-ascii?q?6Y7Kdakitxo1q4qx/RYPdmkzcG0fsu6Xgag+AVtwo21CmdBK4dHVVANyz2ixuI?= =?us-ascii?q?98y+rLlQZGu3a7iw005+ndS/A7GYvg5cX3j4d4w5HS9t8sp/K0jA0Hrp6oHrYN?= =?us-ascii?q?PQd84ctgWIkxfciOhYMJExmeQMhSp8Im/9vmMqy+ggjRxow566oJKLK2J3/KK2?= =?us-ascii?q?GhRYLCH6Z9sP+jHxiqZTht6W0JqyHpVlBDoLRIHnTfS0ED0Mr/TqLBuOECYipX?= =?us-ascii?q?eBArrTBxSf6EB7r3LVD5+kKX+XJH4DzdVtWhaRPkpfjx4IXD8ihJ42ChiqxND9?= =?us-ascii?q?cEd+/j0R+Fj4pQZXx+J2MRnwT2ffqB2uajgqVJiVNABW4R1a50fJLcye6fp+Hy?= =?us-ascii?q?JY/52lsgOAMWmbZwNGDWEHREOEG0zjPrmp5dnF7eeUHOy+IOXSYb+Ws+xRS++I?= =?us-ascii?q?xY6z0oth5zuMON+APn9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?lJ1c3Ua1r4AZLdtWr7Vi0T42cURIFIyHHbG5QfiA95aKEspFVXPo+pZlz+5zs/?= =?us-ascii?q?x4RyHrm4U8+ry0wirXYcSCegC8BBBP1+sFLLRD1lZIimp4//O5VPRG9c4p6dpk?= =?us-ascii?q?xYkEVsMi651YFTJ9tL4jESQDhFuS+ds8eqSM1fxc92CIcBIst4u3f4A65EJISd?= =?us-ascii?q?o3gttbD1zH/W5Sw8uk+gxDqvA6+4U/5Z/2oGFwUpPWuesFMgD+8x/WrJ71/CrE?= =?us-ascii?q?h0//9FCbiLk0pxuixxHpdUBjZGzXqlNUh8TGFas+VGL6TYa85cQ/4sahK0JhMx?= =?us-ascii?q?C+Um0FKT/UFog3j2fjZ+tg1E9CDBRwM0TzUagq/xmT0CrcGqISMaRI9VYjUgdS?= =?us-ascii?q?jFLxmWljxQvBZad05lQYsZAspf97Edw4RU4tLISVywJiEdQBxiKgU43OJEmk5N?= =?us-ascii?q?rEqUZSLQARemePvUrhJ3esKRo9KzI/Ti4AdLkIXnv/4k968bXX2phRWtQczCr4?= =?us-ascii?q?/7rtCKrFWBe7r4M+KmfX/MVzzMjReuhbg6EZXF4y/TPxdFJJVgz3orf4ThA3bR?= =?us-ascii?q?PRtaP6IbO1ZbVadiZNVeueBae9Vrd7sV+aJ2HRKHQQ7vGJazo/ZYKFbTWS7eID?= =?us-ascii?q?+F8uClpoLT97PdQ/D6ZsOQ33bHX753PpBi5DnnAbflz5FR9Vft1/dw8kN6VULG?= =?us-ascii?q?PDqfrNTgIQML4Netdlf4sp0uBzPWD496kGDxyUFYa8oXXyqq/YwdyJxD7HbwTf?= =?us-ascii?q?x30lTvsOJI7bZp8o837K51ycevOajdM+xavlF9DhiSGApq6o0nAHJjSGBJfu8R?= =?us-ascii?q?NPDRcLwbjc/0seD3ELcX6BmP9OxHctbHIlzBms2jCjGdVRNEnR0OqTgBLgeG0P?= =?us-ascii?q?6FgaB0Q96/peflwkIt/0S+LhkewbBv/4iE/KSIpPXQbxTM07cJQbTqSdn1rrQ3?= =?us-ascii?q?vEOe//skm6ASemZteQ2oDPAdVtIBxmfn1a0qwj8sE8LHH7Lk5vFDUmk0kS/+lJ?= =?us-ascii?q?9mHlUZAPUUEaCM/YREkWcyg/bZOcEOcqBehmaPEgapEr0DyX6u8CaXJXdqgxHQ?= =?us-ascii?q?3BHqQGOz6lD2oTV+QSTS09fpilBVWaWvBUdOQyqpPld1sDWLPAfztdr3v6E14F?= =?us-ascii?q?s3MmziutKNjnGuOKhLH83lOdyTPTU0pE8NjJIvXNCv3pobGdWlKtcL7H5+dufe?= =?us-ascii?q?63+skyJZpqdHgIze4t2a+vrJBnSgiqyapK+LxD9G1ng5s1Y/6sqjNvHV/dGKRe?= =?us-ascii?q?qn13oJRSdlpwTBRwK1qqDcr10MPUyLy0LLlYwRM9FXw3Y3y0bm5PI5T9Ir7gVe?= =?us-ascii?q?EYTAaO0eqjDvIjf0xkyfY90vXCmEzzRXBk71EUV/GKUk2WLxvdjGmm3M9FAzXY?= =?us-ascii?q?l/aVDnigJrAIkiLkIt8lcXyDIZEQcRcRCbEK2oBUP9IIQfVEgDchqG06K4eqc2?= =?us-ascii?q?wU1z2qmg5PLXbeFnG6UNMetSgRCUk1hGAJIWtrceT6hmd19a7q7XqRDoC5L7UP?= =?us-ascii?q?j+iXowKfq1T9hC8c8Dq3st/ga/RhSn6ZdZ7LYXkYuIebBAYZjNusB88khm6CUX?= =?us-ascii?q?diNXnBhwkxO5UO4bpOD54djXqpmo5fi0VKYrWeoX8wI4B2Nkj5v/mFoju83Y1/?= =?us-ascii?q?9ASo3JjoTy6A9NLGSQuInEzxl8KfEDK4aqfLZ86XoHJzIRJ28VPdaMbfkz/TNt?= =?us-ascii?q?Oi3J51NeGsMMec8YPM3VlABblELpXq1T9s3cGlOfEId8acQo72vxyDAo/poxSe?= =?us-ascii?q?Lg5yGsJZHf9V5BJfVDgztwlNjavuga3eLSCDQL4XmecxV1xCKCxIWKC/b05+qM?= =?us-ascii?q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QgMx20esfePhxMS09u9gTmoV45ImK0ceKdw?= =?us-ascii?q?/ezpLzJdHTv/iZDOfTz0MwemFVSrAZex/6550mPt4lXL3eBblZsg4fBag9W5Ms?= =?us-ascii?q?LHrx9KdoLANzdQ7Rebu0gsn2pu6RYJtbuWPW5EoqLCjAox0D1uC0TQtjYpCxiX?= =?us-ascii?q?XyJYw/SzNCotB2FBtpApFPG8IBrgqgBZ6Ygqe7hMGt+xAyh+hflZHVQqTO1dKk?= =?us-ascii?q?z8BqUpNH/02XLXPUA6V2hklNkOu/mLHD34P3BMekfskLAqwzYGfAZ6SOO4KlMD?= =?us-ascii?q?OVcpb+fklc6b+H+LRwVxiQIifjUPzVmjejMaBP6F4228RDd+ra0TIp4quTjND7?= =?us-ascii?q?fGxKjjyorXeUOp9S9hnBDKrVWBcCGqnNy3psAaBCNdi8z+wJK9F3hYnE7g=3D?= =?us-ascii?q?=3D?= X-IPAS-Result: =?us-ascii?q?A2BMAgBVM6Fa/wHyM5BeGQEBAQEBAQEBAQEBAQcBAQEBAYN?= =?us-ascii?q?NA4FVKINQixGNBIICgRaBUJJZggcwhVSCRSE1FwECAQEBAQEBAgFqJ4I4JIJIA?= =?us-ascii?q?wMBAiAEGQEBNwECAwkBASEDAiIEAgIDAUEKCAYBDAYCAQEBhHwDFQOfDIsmbYF?= =?us-ascii?q?sOoMBAQEFgWmCPQOBOoIVCBd3hCeBNXmDPCmHf4MvgmKNc3WLawmJWIcJdYg5h?= =?us-ascii?q?TqLRYcuHwE2gVJNIxU6gkOCIg8cghxWiR+CRwEBAQ?= Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 08 Mar 2018 13:02:00 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w28D1xPQ014732; Thu, 8 Mar 2018 08:01:59 -0500 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 w281rVYp106870 for ; Wed, 7 Mar 2018 20:53:31 -0500 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w281rY5l030442 for ; Wed, 7 Mar 2018 20:53:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1AJAQCHlqBalywYGNZeHAEBAQQBAQoBA?= =?us-ascii?q?YNNgVkog1SLGI0IgVAygRaBUJR5hToCRYJFITcVAQIBAQEBAQECEwEBAQEBBhg?= =?us-ascii?q?GhXoDAyMEGQEBNwEPIgMCJgICRQoIBgEMBgIBAYR/AxUDnnCLJm6BbTqDAQEBB?= =?us-ascii?q?YFqgjsDgTqCFQgXeIQjgTV5gz0ph3+DMYJijgB1i3YJiWaHEneIR4VDi0qHOzS?= =?us-ascii?q?BdE0jFTqCQ4IiDxAMghxWiT2CSAEBAQ?= X-IPAS-Result: =?us-ascii?q?A1AJAQCHlqBalywYGNZeHAEBAQQBAQoBAYNNgVkog1SLGI0?= =?us-ascii?q?IgVAygRaBUJR5hToCRYJFITcVAQIBAQEBAQECEwEBAQEBBhgGhXoDAyMEGQEBN?= =?us-ascii?q?wEPIgMCJgICRQoIBgEMBgIBAYR/AxUDnnCLJm6BbTqDAQEBBYFqgjsDgTqCFQg?= =?us-ascii?q?XeIQjgTV5gz0ph3+DMYJijgB1i3YJiWaHEneIR4VDi0qHOzSBdE0jFTqCQ4IiD?= =?us-ascii?q?xAMghxWiT2CSAEBAQ?= X-IronPort-AV: E=Sophos;i="5.47,438,1515474000"; d="scan'208";a="219231" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 07 Mar 2018 20:53:33 -0500 IronPort-PHdr: =?us-ascii?q?9a23=3AqSnNLhWwQV++gBhwtvY3KjQx1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FSslS9myOzcMb36HJrMLmPOkKz9crZ98UFc1QQzzdRB6JJOE70OPOj8VlXtu9?= =?us-ascii?q?zfCx81Kxa0zPr/CNVhyoMeXnqCArSHP6PWsF+I4P8vIuaXaY8JuDfyN/gl5/n0?= =?us-ascii?q?gX8/gl8SZ7Ol3ZQQaHCmTbxaJBC9Wl+k1tMAF3oa+xEzR/HwiUGTFDtUa2u2Uo?= =?us-ascii?q?oi6TwhToGrF4HOQsaqmrPXmG+ZF5hbfShjDUqWEGygI4eBXO0WaTm6JMZknz1C?= =?us-ascii?q?UqKuHdwPzxar4STz0Ld2ZtHf+iQFu5buzpAh7OTImAAa7jd0BtmT12yXCmp92G?= =?us-ascii?q?gPQmllj+hEvUVhxwLbguBDiPtCGIkWt6tE?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0D1AAA8l6BalywYGNZeHAEBAQQBAQoBA?= =?us-ascii?q?YNNgVkog1SLGI0IgVAygRaBUJR5hToCRYJFITcVAQIBAQEBAQECARIBAQEBAQY?= =?us-ascii?q?YBlaCOCSCSAMDIwQZAQE3AQ8iAwImAgJFCggGAQwGAgEBhH8DFQOecIsmboFtO?= =?us-ascii?q?oMBAQEFgWqCOwOBOoIVCBd4hCOBNXmDPSmHf4MxgmKOAHWLdgmJZocSd4hHhUO?= =?us-ascii?q?LSoc7NIF0TSMVOoJDgiIPEAyCHFaJPYJIAQEB?= X-IPAS-Result: =?us-ascii?q?A0D1AAA8l6BalywYGNZeHAEBAQQBAQoBAYNNgVkog1SLGI0?= =?us-ascii?q?IgVAygRaBUJR5hToCRYJFITcVAQIBAQEBAQECARIBAQEBAQYYBlaCOCSCSAMDI?= =?us-ascii?q?wQZAQE3AQ8iAwImAgJFCggGAQwGAgEBhH8DFQOecIsmboFtOoMBAQEFgWqCOwO?= =?us-ascii?q?BOoIVCBd4hCOBNXmDPSmHf4MxgmKOAHWLdgmJZocSd4hHhUOLSoc7NIF0TSMVO?= =?us-ascii?q?oJDgiIPEAyCHFaJPYJIAQEB?= X-IronPort-AV: E=Sophos;i="5.47,438,1515456000"; d="scan'208";a="9474830" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from ucol3cpa06.eemsg.mail.mil ([214.24.24.44]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 08 Mar 2018 01:53:33 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;69e1b989-471b-4043-bae1-2558393549c5 Authentication-Results: ucol19pa05.eemsg.mail.mil; dkim=pass (signature verified) header.i=@yahoo.com X-EEMSG-check-008: 405499849|UCOL19PA05_EEMSG_MP3.csd.disa.mil X-EEMSG-SBRS: 3.4 X-EEMSG-ORIG-IP: 66.163.185.41 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BxAADAlqBahim5o0JeGwEBAQEDAQEBCQEBAYUmKINUixiOWDKBFoFQlHmFOgJFgkUhNxUBAgEBAQEBAQITAQEBCAsLCCguhSQDAyMEGQEBNwEPIgMCJgICRQoIBgEMBgIBAYR/AxWec4smboFtOoMBAQEFgWqCOwOBOoIVCBd4hCOBNYQ2KYd/gzGCYo4AdYt2CYlmhxJ3iEeFQ4tKhzs0gXRNIxU6gkOCIg8QDIIcHzeJPYJIAQEB X-IPAS-Result: A0BxAADAlqBahim5o0JeGwEBAQEDAQEBCQEBAYUmKINUixiOWDKBFoFQlHmFOgJFgkUhNxUBAgEBAQEBAQITAQEBCAsLCCguhSQDAyMEGQEBNwEPIgMCJgICRQoIBgEMBgIBAYR/AxWec4smboFtOoMBAQEFgWqCOwOBOoIVCBd4hCOBNYQ2KYd/gzGCYo4AdYt2CYlmhxJ3iEeFQ4tKhzs0gXRNIxU6gkOCIg8QDIIcHzeJPYJIAQEB Received: from sonic313-18.consmr.mail.ne1.yahoo.com ([66.163.185.41]) by ucol19pa05.eemsg.mail.mil with ESMTP; 08 Mar 2018 01:53:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1520474011; bh=sW6Mo3CFxclK9v5yEyp8zkv7GzniBZ5kF4Qp8MMhFyc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=r6ymnGR43TB4ZsOLY2DRJtK3HkDpgqjC5/nDziFrmOB0kpBbMwIylrAP2x/aY7dMNW3f2NNNSLuXyIy4UzwWZXOf4nEeNymU4vBntB7UFsJRF01kfjcW4+sPSSOLR65mPSww9Uez77m6r2EoY0/PjEDneiM/w2p/p9MwLFwIY39ZZM3ApjGfuD75hsH5ZQd/M0xoQNrR6dnTEC3OUgsu1yRDsm1M3eRR0YnQEQblI5wXO8RaHvWjNZngNnq4Gwa8WGzedSxzfncjmum0taeIU9csbCNy5XbmlW09M949raKWkEXNhj6Qc863RkJoou8BZ6KvPXB6N8YjuR2Z9hV+sw== X-YMail-OSG: bbZFRqQVM1nPRqd3dLgidYekpAMG9eRGpKAbj38mugz1QXjNj9ob9qn1cHefROF K_BlkbvjjUUZ_1eWIZP4QpjkDagT0JMllhMlNhAx8nH1CfyyUAXtS6_xqwqkDR7UN06VL21q14Gc q1HliMyciIuD_RQb623xdD86dRVAsaRQM2TxO7bzI50cfr0uQ.3kGCIfMIvbmR7RHm711GO9siUa FoEMzc_14u.shY2.JvPQ4mlVC9hhIENd5IY4H8uTWyNPiY5VaOfI1_4W.9D4q_DFgRic5T1lhId. zBU7z1P0mmEpi.mDEcXwxtCRfrctUhxG1tdGpJkPh54Ak9HaqmcXIepr3R9BLzduJtjvypJzsDU2 kZea5soDkM3hTnhf.cjsS3UcUkqfcLLVCXFf6stqVrmwkZb3lvrDTvK0EssWajWeIGoMAEz7iqD1 zvpBSxGKWTix4oN.MmafitJOB6ZlvHxS.9ffS8G.fm65lHcXnoRihF64IPxw2Z9OQnO8QIe.lyFK dFGCPjRJiDDiRDi99iy1SYqybMCZHzsr_8lW0S50zE9Z3tsGGcJrOsPS5xoNh.qhw Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 8 Mar 2018 01:53:31 +0000 Received: from smtpgate102.mail.ne1.yahoo.com (EHLO [192.168.0.104]) ([216.155.193.199]) by smtp415.mail.ne1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 97edcd134657cb20a0fa4cbc1166d25b; Thu, 08 Mar 2018 01:53:29 +0000 (UTC) To: LSM , James Morris References: X-EEMSG-check-009: 444-444 From: Casey Schaufler Message-ID: Date: Wed, 7 Mar 2018 17:53:26 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mailman-Approved-At: Thu, 08 Mar 2018 08:00:06 -0500 Subject: [PATCH 6/8] LSM: General stacking 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: John Johansen , Tetsuo Handa , SE Linux , Stephen Smalley , SMACK-announce@lists.01.org, Kees Cook Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Subject: [PATCH 6/8] LSM: General stacking Leverage the infrastructure management of the security blobs to allow stacking of security modules in all but the most extreme case. Security modules are informed of the location of their data within the blobs at module initialization. Stacking is optional. If stacking is not configured the old limit of one "major" security module applies. If stacking is configured TOMOYO can be configured with an of the other modules. SELinux, Smack and AppArmor use (or in the AppArmor case, threaten to use) secids, which are not (yet) shareable. Signed-off-by: Casey Schaufler --- Documentation/admin-guide/LSM/index.rst | 14 ++++-- include/linux/lsm_hooks.h | 2 +- security/Kconfig | 86 +++++++++++++++++++++++++++++++++ security/apparmor/include/context.h | 10 ++++ security/apparmor/lsm.c | 8 ++- security/security.c | 30 +++++++++++- security/selinux/hooks.c | 3 +- security/selinux/include/objsec.h | 8 +++ security/smack/smack.h | 9 ++++ security/smack/smack_lsm.c | 17 +++---- security/tomoyo/common.h | 12 ++++- security/tomoyo/tomoyo.c | 3 +- 12 files changed, 181 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/LSM/index.rst b/Documentation/admin-guide/LSM/index.rst index 9842e21afd4a..d3d8af174042 100644 --- a/Documentation/admin-guide/LSM/index.rst +++ b/Documentation/admin-guide/LSM/index.rst @@ -17,10 +17,16 @@ 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. -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. +The Linux capabilities modules will always be included. For more details +on capabilities, see ``capabilities(7)`` in the Linux man-pages project. + +Security modules that do not use the security data blobs maintained +by the LSM infrastructure are considered "minor" modules. These may be +included at compile time and stacked explicitly. Security modules that +use the LSM maintained security blobs are considered "major" modules. +These may only be stacked if the CONFIG_LSM_STACKED configuration +option is used. If this is chosen all of the security modules selected +will be used. A list of the active security modules can be found by reading ``/sys/kernel/security/lsm``. This is a comma separated list, and diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 03f036ab7b59..2e05734bc46e 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h @@ -2030,7 +2030,7 @@ static inline void security_delete_hooks(struct security_hook_list *hooks, #define __lsm_ro_after_init __ro_after_init #endif /* CONFIG_SECURITY_WRITABLE_HOOKS */ -extern int __init security_module_enable(const char *module); +extern bool __init security_module_enable(const char *lsm, const bool stacked); extern void __init capability_add_hooks(void); #ifdef CONFIG_SECURITY_YAMA extern void __init yama_add_hooks(void); diff --git a/security/Kconfig b/security/Kconfig index 116dba966553..8225388b81c3 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -36,6 +36,28 @@ config SECURITY_WRITABLE_HOOKS bool default n +config SECURITY_STACKING + bool "Security module stacking" + depends on SECURITY + help + Allows multiple major security modules to be stacked. + Modules are invoked in the order registered with a + "bail on fail" policy, in which the infrastructure + will stop processing once a denial is detected. Not + all modules can be stacked. SELinux and Smack are + known to be incompatible. User space components may + have trouble identifying the security module providing + data in some cases. + + If you select this option you will have to select which + of the stackable modules you wish to be active. The + "Default security module" will be ignored. The boot line + "security=" option can be used to specify that one of + the modules identifed for stacking should be used instead + of the entire stack. + + If you are unsure how to answer this question, answer N. + config SECURITY_LSM_DEBUG bool "Enable debugging of the LSM infrastructure" depends on SECURITY @@ -251,6 +273,9 @@ source security/yama/Kconfig source security/integrity/Kconfig +menu "Security Module Selection" + visible if !SECURITY_STACKING + choice prompt "Default security module" default DEFAULT_SECURITY_SELINUX if SECURITY_SELINUX @@ -290,3 +315,64 @@ config DEFAULT_SECURITY endmenu +menu "Security Module Stack" + visible if SECURITY_STACKING + +choice + prompt "Stacked 'extreme' security module" + default SECURITY_SELINUX_STACKED if SECURITY_SELINUX + default SECURITY_SMACK_STACKED if SECURITY_SMACK + default SECURITY_APPARMOR_STACKED if SECURITY_APPARMOR + + help + Enable an extreme security module. These modules cannot + be used at the same time. + + config SECURITY_SELINUX_STACKED + bool "SELinux" if SECURITY_SELINUX=y + help + This option instructs the system to use the SELinux checks. + At this time the Smack security module is incompatible with this + module. + At this time the AppArmor security module is incompatible with this + module. + + config SECURITY_SMACK_STACKED + bool "Simplified Mandatory Access Control" if SECURITY_SMACK=y + help + This option instructs the system to use the Smack checks. + At this time the SELinux security module is incompatible with this + module. + At this time the AppArmor security module is incompatible with this + module. + + config SECURITY_APPARMOR_STACKED + bool "AppArmor" if SECURITY_APPARMOR=y + help + This option instructs the system to use the AppArmor checks. + At this time the SELinux security module is incompatible with this + module. + At this time the Smack security module is incompatible with this + module. + + config SECURITY_NOTHING_STACKED + bool "Use no 'extreme' security module" + help + Use none of the SELinux, Smack or AppArmor security module. + +endchoice + +config SECURITY_TOMOYO_STACKED + bool "TOMOYO support is enabled by default" + depends on SECURITY_TOMOYO && SECURITY_STACKING + default n + help + This option instructs the system to use the TOMOYO checks. + If not selected the module will not be invoked. + Stacked security modules may interact in unexpected ways. + + If you are unsure how to answer this question, answer N. + +endmenu + +endmenu diff --git a/security/apparmor/include/context.h b/security/apparmor/include/context.h index c6e106a533e8..c6d5dbbd18b0 100644 --- a/security/apparmor/include/context.h +++ b/security/apparmor/include/context.h @@ -55,9 +55,15 @@ int aa_set_current_hat(struct aa_label *label, u64 token); int aa_restore_previous_label(u64 cookie); struct aa_label *aa_get_task_label(struct task_struct *task); +extern struct lsm_blob_sizes apparmor_blob_sizes; + static inline struct aa_task_ctx *apparmor_cred(const struct cred *cred) { +#ifdef CONFIG_SECURITY_STACKING + return cred->security + apparmor_blob_sizes.lbs_cred; +#else return cred->security; +#endif } /** @@ -89,7 +95,11 @@ static inline struct aa_label *aa_get_newest_cred_label(const struct cred *cred) static inline struct aa_file_ctx *apparmor_file(const struct file *file) { +#ifdef CONFIG_SECURITY_STACKING + return file->f_security + apparmor_blob_sizes.lbs_file; +#else return file->f_security; +#endif } /** diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 03c7cbce4853..f0b1694c4a6f 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -1105,7 +1105,9 @@ static int __init apparmor_init(void) int error; if (!finish) { - if (apparmor_enabled && security_module_enable("apparmor")) + if (apparmor_enabled && + security_module_enable("apparmor", + IS_ENABLED(CONFIG_SECURITY_APPARMOR_STACKED))) security_add_blobs(&apparmor_blob_sizes); else apparmor_enabled = false; @@ -1113,7 +1115,9 @@ static int __init apparmor_init(void) return 0; } - if (!apparmor_enabled || !security_module_enable("apparmor")) { + if (!apparmor_enabled || + !security_module_enable("apparmor", + IS_ENABLED(CONFIG_SECURITY_APPARMOR_STACKED))) { aa_info_message("AppArmor disabled by boot time parameter"); apparmor_enabled = false; return 0; diff --git a/security/security.c b/security/security.c index 4ca49b5074f8..42255b40768a 100644 --- a/security/security.c +++ b/security/security.c @@ -36,6 +36,7 @@ /* Maximum number of letters for an LSM name string */ #define SECURITY_NAME_MAX 10 +#define MODULE_STACK "(stacking)" struct security_hook_heads security_hook_heads __lsm_ro_after_init; static ATOMIC_NOTIFIER_HEAD(lsm_notifier_chain); @@ -48,7 +49,11 @@ static struct lsm_blob_sizes blob_sizes; /* Boot-time LSM user choice */ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] = +#ifdef CONFIG_SECURITY_STACKING + MODULE_STACK; +#else CONFIG_DEFAULT_SECURITY; +#endif static void __init do_security_initcalls(void) { @@ -168,6 +173,7 @@ static int lsm_append(char *new, char **result) /** * security_module_enable - Load given security module on boot ? * @module: the name of the module + * @stacked: indicates that the module wants to be stacked * * Each LSM must pass this method before registering its own operations * to avoid security registration races. This method may also be used @@ -183,9 +189,29 @@ static int lsm_append(char *new, char **result) * * Otherwise, return false. */ -int __init security_module_enable(const char *module) +bool __init security_module_enable(const char *lsm, const bool stacked) { - return !strcmp(module, chosen_lsm); +#ifdef CONFIG_SECURITY_STACKING + /* + * Module defined on the command line security=XXXX + */ + if (strcmp(chosen_lsm, MODULE_STACK)) { + if (!strcmp(lsm, chosen_lsm)) { + pr_info("Command line sets the %s security module.\n", + lsm); + return true; + } + return false; + } + /* + * Module configured as stacked. + */ + return stacked; +#else + if (strcmp(lsm, chosen_lsm) == 0) + return true; + return false; +#endif } /** diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index cb51b66c483b..5aa8caf2e23d 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -6454,7 +6454,8 @@ static __init int selinux_init(void) { static int finish; - if (!security_module_enable("selinux")) { + if (!security_module_enable("selinux", + IS_ENABLED(CONFIG_SECURITY_SELINUX_STACKED))) { selinux_enabled = 0; return 0; } diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index 56b9428ac934..e3f4f7b57b23 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -159,12 +159,20 @@ extern struct lsm_blob_sizes selinux_blob_sizes; static inline struct task_security_struct *selinux_cred(const struct cred *cred) { +#ifdef CONFIG_SECURITY_STACKING + return cred->security + selinux_blob_sizes.lbs_cred; +#else return cred->security; +#endif } static inline struct file_security_struct *selinux_file(const struct file *file) { +#ifdef CONFIG_SECURITY_STACKING + return file->f_security + selinux_blob_sizes.lbs_file; +#else return file->f_security; +#endif } static inline struct inode_security_struct *selinux_inode( diff --git a/security/smack/smack.h b/security/smack/smack.h index d2df0af9e5b5..87ced0fc1a19 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h @@ -337,6 +337,7 @@ extern struct smack_known *smack_syslog_label; extern struct smack_known *smack_unconfined; #endif extern int smack_ptrace_rule; +extern struct lsm_blob_sizes smack_blob_sizes; extern struct smack_known smack_known_floor; extern struct smack_known smack_known_hat; @@ -359,12 +360,20 @@ extern struct hlist_head smack_known_hash[SMACK_HASH_SLOTS]; static inline struct task_smack *smack_cred(const struct cred *cred) { +#ifdef CONFIG_SECURITY_STACKING + return cred->security + smack_blob_sizes.lbs_cred; +#else return cred->security; +#endif } static inline struct smack_known **smack_file(const struct file *file) { +#ifdef CONFIG_SECURITY_STACKING + return file->f_security + smack_blob_sizes.lbs_file; +#else return file->f_security; +#endif } static inline struct inode_smack *smack_inode(const struct inode *inode) diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 5197c7bf7f63..78086e5dc29f 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -3424,18 +3424,16 @@ static int smack_getprocattr(struct task_struct *p, char *name, char **value) { struct smack_known *skp = smk_of_task_struct(p); char *cp; - int slen; - if (strcmp(name, "current") != 0) + if (strcmp(name, "current") == 0) { + cp = kstrdup(skp->smk_known, GFP_KERNEL); + if (cp == NULL) + return -ENOMEM; + } else return -EINVAL; - cp = kstrdup(skp->smk_known, GFP_KERNEL); - if (cp == NULL) - return -ENOMEM; - - slen = strlen(cp); *value = cp; - return slen; + return strlen(cp); } /** @@ -4674,7 +4672,8 @@ static __init int smack_init(void) struct cred *cred = (struct cred *) current->cred; struct task_smack *tsp; - if (!security_module_enable("smack")) + if (!security_module_enable("smack", + IS_ENABLED(CONFIG_SECURITY_SMACK_STACKED))) return 0; if (!finish) { diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 0110bebe86e2..f386f92c57c5 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h @@ -1087,6 +1087,7 @@ extern struct tomoyo_domain_info tomoyo_kernel_domain; extern struct tomoyo_policy_namespace tomoyo_kernel_namespace; extern unsigned int tomoyo_memory_quota[TOMOYO_MAX_MEMORY_STAT]; extern unsigned int tomoyo_memory_used[TOMOYO_MAX_MEMORY_STAT]; +extern struct lsm_blob_sizes tomoyo_blob_sizes; /********** Inlined functions. **********/ @@ -1206,7 +1207,11 @@ static inline void tomoyo_put_group(struct tomoyo_group *group) */ static inline struct tomoyo_domain_info **tomoyo_cred(const struct cred *cred) { +#ifdef CONFIG_SECURITY_STACKING + return cred->security + tomoyo_blob_sizes.lbs_cred; +#else return cred->security; +#endif } /** @@ -1216,8 +1221,13 @@ static inline struct tomoyo_domain_info **tomoyo_cred(const struct cred *cred) */ static inline struct tomoyo_domain_info *tomoyo_domain(void) { - struct tomoyo_domain_info **blob = tomoyo_cred(current_cred()); + const struct cred *cred = current_cred(); + struct tomoyo_domain_info **blob; + + if (cred->security == NULL) + return NULL; + blob = tomoyo_cred(cred); return *blob; } diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index 821ca242a194..eb4b886b6076 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@ -564,7 +564,8 @@ static int __init tomoyo_init(void) struct cred *cred = (struct cred *) current_cred(); struct tomoyo_domain_info **blob; - if (!security_module_enable("tomoyo")) { + if (!security_module_enable("tomoyo", + IS_ENABLED(CONFIG_SECURITY_TOMOYO_STACKED))) { tomoyo_enabled = false; return 0; }