From patchwork Fri May 11 00:52:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Casey Schaufler X-Patchwork-Id: 10394409 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 0AE8460170 for ; Fri, 11 May 2018 14:40:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF66F28EAC for ; Fri, 11 May 2018 14:40:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0EB128E89; Fri, 11 May 2018 14:40:25 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,NO_RDNS_DOTCOM_HELO,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from upbd19pa10.eemsg.mail.mil (upbd19pa10.eemsg.mail.mil [214.24.27.85]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B8F128E89 for ; Fri, 11 May 2018 14:40:24 +0000 (UTC) Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by upbd19pa10.eemsg.mail.mil with ESMTP; 11 May 2018 14:40:23 +0000 X-IronPort-AV: E=Sophos;i="5.49,389,1520899200"; d="scan'208";a="13190235" IronPort-PHdr: =?us-ascii?q?9a23=3Ar0cM2BWIRE7UsUxjGbD7RPUC6IrV8LGtZVwlr6?= =?us-ascii?q?E/grcLSJyIuqrYYhSEu6dThVPEFb/W9+hDw7KP9fy4AipYud6oizMrSNR0TR?= =?us-ascii?q?gLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ?= =?us-ascii?q?/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9uIhi6txndutULioZ+N6g9zQ?= =?us-ascii?q?fErGFVcOpM32NoIlyTnxf45siu+ZNo7jpdtfE8+cNeSKv2Z6s3Q6BWAzQgKG?= =?us-ascii?q?A1+dbktQLfQguV53sTSXsZnxxVCAXY9h76X5Pxsizntuph3SSRIMP7QawoVT?= =?us-ascii?q?mk8qxmUwHjhjsZODEl8WHXks1wg7xdoBK9vBx03orYbJiIOPZiYq/ReNUXSm?= =?us-ascii?q?RbXsZVSidPHIWyYYUSBOYFJOpUspXxq14IoBS5BwajHuPvyjhPhnPvxKE3z+?= =?us-ascii?q?osHADb0AA5A94CrWnfoNHrOKsOVOy4yrTDwzfeYPNMwTrz9obIfBAir/+CU7?= =?us-ascii?q?1/fsjexlUgGQ3YllWdq5HpMj2L2eQWqGWb8+htWPizh2I7pQx8oD6izdoshI?= =?us-ascii?q?nTgYIVz0jJ+Dtjz4YuO9K5SFNwb8O4H5tQrS6aKoV2Qsc8TGFypS03zaEJto?= =?us-ascii?q?SgfCcUyJUq3AXfZOCHc4eS/xLjWuKRLilihH58ZL2wnQy+/lSnyu35T8S51k?= =?us-ascii?q?tBoCldktTUq3wA2BPe5tKHR/dg5EutxzmC2x7J5u1ZOUw5lKjWJ4Q8zrMxkp?= =?us-ascii?q?cfq0XOEy/slEnokqObeUMp8fWy5ev9eLXpvJqcOpdxigH5L6shhNSyAf89Mg?= =?us-ascii?q?gSR2ib/vm81KH78U35XrpKivo2n7HFsJ/AP8Qbp7O5AxRP3oY/6xewEzem0N?= =?us-ascii?q?MCkXkBMF1FYw6Ig5LsO1HPJPD0Ffa/g1Kynzd33/3KI7LsD5rXInXDjbvtZ6?= =?us-ascii?q?hx5kFCxAYp0NxT/5dUBasAIPL3VE/xrtvYDhohPgyv3ennDNR91oUDWWOAG6?= =?us-ascii?q?OWK6TSsUKO5u0zPeaMf5QYuCr9Kvc55/7uimU1mVkGfaazx5cXZ3e4Hup+L0?= =?us-ascii?q?WDfXXsmssBEXsNvgcmTuzqj1uCXiRPZ3ayRa084Co2CIChDYfFQ4CimqeB3D?= =?us-ascii?q?ulEZ1MfWBKEFeMEW3nd4+cQfcDdDqSItN9kjwDTbWhSY0h2guyuw/50LpnKe?= =?us-ascii?q?zU+iwGtZ/42th14/DTlB4p+jxpCcSdz3yNQ3tznmMSSD88xLp/rlBlylefza?= =?us-ascii?q?h4hORVFNJS5/NNVwc1K4Tcwvd0C9/sRw3Bec2JR0y+QtW8BjExTMw+zMMSY0?= =?us-ascii?q?pnHNWilB/D1TKwA7AJj7yLGIA08qXE0nfsO8l9znHG1K89j1U7WcZPK3Ophr?= =?us-ascii?q?R+9wnSAI7JlV+Vl6C0eqQAxCTN7nuMzXKSvEFEVw59SbjKXWwFaUvMttn2+k?= =?us-ascii?q?TCT7qyBrs9KQtB1dSOKq1UZd31lV9GXuvsOMzCY2KtnGe9HRaJx7KLbIrsYG?= =?us-ascii?q?gd2SHdBFEFkwAV53qGMxIxBj2io2LfEjxhC0jjY0Xy/ulisHm7VFM7zxmWb0?= =?us-ascii?q?190Lq44hAVheaGRPMVwr0EuTwhpi5xHFal3tLaEsGApgR6fKlGZtM9+lhH33?= =?us-ascii?q?rDtwNhJpygM7xihlkGfgR0pUzu1BJ3CphbnMgptnwqzw1yKb+C3FNGbTOY0o?= =?us-ascii?q?j6OqfLJWnq4BCvd6nW10nE39mL4KcP6eo3q0/4sQ6zCkUi9m9r095P03uT/p?= =?us-ascii?q?/KFhYdUYrtUkYr8Bh3v6vabTQg6I7P2n1sNKa1viXE2903GOsv0gygcMtHMK?= =?us-ascii?q?OYCA/yFNUXB9OgKOwwnFipdQ4EMftJ9K4yOMOnef6G17StPOp6mjKpk3hH6p?= =?us-ascii?q?hn0k2Q7yp8VvLI35EdzvCWxASHUyv8g0m7ssDsgo1Eey8dHnCkxij5AY5dfK?= =?us-ascii?q?pyfZwECW22Oc242s1+h4LxW35f7FOjAVIG2MuteRWMdF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+PNaBvR17cEULDwRszvtrQsp1?= =?us-ascii?q?+S5fo8mb4Ie2x6fwqnEOwHWc4G3GvgzKcqzSU3E8PYBL/g/fFOVn0jkjLngZ?= =?us-ascii?q?B9EE0cGukIErqT4YRegmA4lvTFOdIMdqBNhH2PFQKkE78F0nOr8DeYIGh7jR?= =?us-ascii?q?HIzxHwQHm84EXwrSBmXSvG183jnVZNVrmrGUdSWDKkOUtjsDOKPAflr9T3tr?= =?us-ascii?q?oo40ExKGzrrsqNlHGmOLNVAcLwOMCcLTMzpFINg507Xsav1pwDGdqhPNcR92?= =?us-ascii?q?lzbvnf62OuiCJBprlIhorA7cGP+/XXG3agg7ecq7qT2DBS0mI4sk0n6tC8Kv?= =?us-ascii?q?HO4MWHQ/Wp1mkLVShwpxDMXwWrpbzHsV8bJVaH0EDRmIwFJttZx2U31ln65O?= =?us-ascii?q?g/R9I+7B5RFofbZ/IMvz/zOjr0wUqHY90tSyme1yBaEU7yEVZlBqczwn/wvN?= =?us-ascii?q?jOlXfK4VIkXI5wd1bohRZvFYU3NVot6EQLwioECQUNcQqUDK20CkTlI4oEUl?= =?us-ascii?q?IDaRee0LihZKg32UxzwrWy5O7cduF8H7ACNupBgQ6OkllbHYgWsa4ETLJ/ZV?= =?us-ascii?q?Bd7qjXqRbmC4T9WPjmj3UwP+WvQs9G6cAZq2ci4gGnShqv85hD9agUiIyIdq?= =?us-ascii?q?NfZZjMvdx84Fln5TEVayxNmwJzjxWnXuAAvOrj+MTUsIK06uayU6YgX+oX+A?= =?us-ascii?q?YyB2RiiJvwh1cvocrJ2OdYS43Vj5n/8Q9WLn6OponayRl9JvAUJ4KtYrlg62?= =?us-ascii?q?0NJzICKHIWIdqWd/487jdxPzXR/VNNHtgBas8fPMrJnQBUi1PmWKtP9sXFBl?= =?us-ascii?q?CYC51/d8cy72r40Do164czUv786D+qIpDS91RNP/RFjCVwm9LNuvMYwf/TCC?= =?us-ascii?q?cN53mWdQR1wy2Fy5mXCPbw5v+AyNfKW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q?qE+G/874W/iH/JoeSGCC8gbkkuj6QHCWiFhhxBLDJhaZkZu0DoF7aJfF0ElG?= =?us-ascii?q?kohuRnxwIWdUxtX2dv3HxbkLf1GsBQRVMOymL7aOwPbFdwSjg3+EI=3D?= X-IPAS-Result: =?us-ascii?q?A2BzBwDMqvVa/wHyM5BcGgEBAQEBAgEBAQEIAQEBAYNAA?= =?us-ascii?q?4FcKINyiGKMEYF5gQ+BQJNpJxMBhQeCQyE3FQECAQEBAQEBAgFrHAyCNSSCT?= =?us-ascii?q?wEDAwECIAQZAQE4AgMJAQEbAwECAwIiBAICAwFBCggGAQwGAgEBAYMegWkDF?= =?us-ascii?q?QOhR4oYbYFpM4JvAQEFgQIBAV6CNAOBNYJACBdyhHiCJIITgQ8jgjqIIYJUh?= =?us-ascii?q?zqEXmOLOAmOS2SHE4R4izWGSjIigVJNIxWCfoIUDBeDRYocAVVPegEBkBUBA?= =?us-ascii?q?Q?= Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 11 May 2018 14:40:22 +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 w4BEeLJT003326; Fri, 11 May 2018 10:40:21 -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 w4B0qdAa007099 for ; Thu, 10 May 2018 20:52:39 -0400 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 w4B0qksH001514 for ; Thu, 10 May 2018 20:52:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1BwAwCA6PRaly0YGNZcHAEBAQQBAQoBA?= =?us-ascii?q?YNAgV8og3GIYIwQgXmBD4FAk2uEdwJFgjshOBQBAgEBAQEBAQIUAQEBAQEGGAZ?= =?us-ascii?q?LhTQBAwMjBBkBATgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFQOgaIoYbYFpM?= =?us-ascii?q?4JvAQEFgQIBAV6COgOBNYJACBdyhHiCJIITgQ8jgjqIIYJUhziEXmOLNgmOSWS?= =?us-ascii?q?HEoR1giuJB4ZJM4FzTSMVgn6CFAwOCYNFihwBVU+QOwEB?= X-IPAS-Result: =?us-ascii?q?A1BwAwCA6PRaly0YGNZcHAEBAQQBAQoBAYNAgV8og3GIYIw?= =?us-ascii?q?QgXmBD4FAk2uEdwJFgjshOBQBAgEBAQEBAQIUAQEBAQEGGAZLhTQBAwMjBBkBA?= =?us-ascii?q?TgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFQOgaIoYbYFpM4JvAQEFgQIBAV6?= =?us-ascii?q?COgOBNYJACBdyhHiCJIITgQ8jgjqIIYJUhziEXmOLNgmOSWSHEoR1giuJB4ZJM?= =?us-ascii?q?4FzTSMVgn6CFAwOCYNFihwBVU+QOwEB?= X-IronPort-AV: E=Sophos;i="5.49,387,1520913600"; d="scan'208";a="274378" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.35]) by goalie.tycho.ncsc.mil with ESMTP; 10 May 2018 20:52:45 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3A9wPhoxY3Wmkf9aAvura3TPT/LSx+4OfEezUN45?= =?us-ascii?q?9isYplN5qZps67YB7h7PlgxGXEQZ/co6odzbaO6Oa4ASQp2tWoiDg6aptCVh?= =?us-ascii?q?sI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFR?= =?us-ascii?q?rhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahb75+Ngm6oRnMvcQKnIVuLbo8xA?= =?us-ascii?q?HUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLn?= =?us-ascii?q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= =?us-ascii?q?/T/TcV85nk0Y4xr9bPmAky+Do8NMGU12WAXikghW8TbyMn16B450pmwxGM1r?= =?us-ascii?q?Yux7RjOJR35vVUQk9uLpPYzupnG/juSwnBeZGPU1/gTdK4V3V5BOkU6vQtJk?= =?us-ascii?q?p8AN6/lQvr2yuxH6RTz+XNA4Y7uOqI5F3YDOU4x3fd37Q6lHEiQ9BTLiv+3+?= =?us-ascii?q?h47QeFQ8brlEWf34Stda0axyPLvDOBymqI+kNfUAd2SqjDdXsWYEzQrN/w4g?= =?us-ascii?q?XJSLr4TfwEPwZageWFLagCPt7kgE5NQ/DgEN/eeWW0mnq1QxGSyeXIJLbnZ3?= =?us-ascii?q?4A2239AU4ImkhH5XuAOhU/AGKirnjYAThGFBfrZF3ht/J3q26hRwkywkeIdx?= =?us-ascii?q?sln5i8/xMOzdmbUekSxfpQuiImsS91B3671tfbCpyHvQU3L4tGZtZoy15c2H?= =?us-ascii?q?ORjAd9N4GuK614zgoVeh96rmv13BV+F4tEnNJvp3psxw13f/HLmGhdfi+ViM?= =?us-ascii?q?ijcobcLXP/qVX/M/SMiFjDzNab/LsO4/0kqlLl+RukDVcm7244jItI2HyYv8?= =?us-ascii?q?TSBVJMF5/8V104sR1zprWcZyg5tMvY1nxpZLG9qSSKm8koC+0s1gu6cp9BPb?= =?us-ascii?q?mFGg7/H4xSB8WnJOEw3Vn8RgMNPOdVsqUzOs4=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AtAwC66PRaly0YGNZcHAEBAQQBAQo?= =?us-ascii?q?BAYNAgV8og3GIYIwQgXmBD4FAk2uEdwJFgjshOBQBAgEBAQEBAQIBEwEBAQE?= =?us-ascii?q?BBhgGSwyCNSSCTwEDAyMEGQEBOA8cAwECAwImAgJFCggGAQwGAgEBgx+BaQM?= =?us-ascii?q?VA6BoihhtgWkzgm8BAQWBAgEBXoI6A4E1gkAIF3KEeIIkghOBDyOCOoghglS?= =?us-ascii?q?HOIReY4s2CY5JZIcShHWCK4kHhkkzgXNNIxWCfoIUDA4Jg0WKHAFVT5A7AQE?= X-IPAS-Result: =?us-ascii?q?A0AtAwC66PRaly0YGNZcHAEBAQQBAQoBAYNAgV8og3GIY?= =?us-ascii?q?IwQgXmBD4FAk2uEdwJFgjshOBQBAgEBAQEBAQIBEwEBAQEBBhgGSwyCNSSCT?= =?us-ascii?q?wEDAyMEGQEBOA8cAwECAwImAgJFCggGAQwGAgEBgx+BaQMVA6BoihhtgWkzg?= =?us-ascii?q?m8BAQWBAgEBXoI6A4E1gkAIF3KEeIIkghOBDyOCOoghglSHOIReY4s2CY5JZ?= =?us-ascii?q?IcShHWCK4kHhkkzgXNNIxWCfoIUDA4Jg0WKHAFVT5A7AQE?= X-IronPort-AV: E=Sophos;i="5.49,387,1520899200"; d="scan'208";a="13170958" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from ucol3cpa07.eemsg.mail.mil ([214.24.24.45]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 11 May 2018 00:52:45 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;3e2fb5bd-ce83-4292-9d6b-bbca28753a10 Authentication-Results: ucol19pa06.eemsg.mail.mil; dkim=pass (signature verified) header.i=@yahoo.com X-EEMSG-check-008: 423750434|UCOL19PA06_EEMSG_MP4.csd.disa.mil X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 66.163.189.90 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A9AgCA6PRah1q9o0JcHAEBAQQBAQoBAYUfKINxiGCOCYEPgUCTa4R3AkWCOyE4FAECAQEBAQEBAhQBAQEKCwkIKCMMhSgBAwMjBBkBATgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFaBrihhtgWkzgm8BAQWBAgEBXoI6A4E1gkAIF3KEeIQ3gQ8jgjqIIYJUhziEXmOLNgmOSWSHEoR1izKGSTOBc00jFYJ+ghQMDgmDRYocAVUfMJA7AQE X-IPAS-Result: A0A9AgCA6PRah1q9o0JcHAEBAQQBAQoBAYUfKINxiGCOCYEPgUCTa4R3AkWCOyE4FAECAQEBAQEBAhQBAQEKCwkIKCMMhSgBAwMjBBkBATgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFaBrihhtgWkzgm8BAQWBAgEBXoI6A4E1gkAIF3KEeIQ3gQ8jgjqIIYJUhziEXmOLNgmOSWSHEoR1izKGSTOBc00jFYJ+ghQMDgmDRYocAVUfMJA7AQE Received: from sonic306-28.consmr.mail.ne1.yahoo.com ([66.163.189.90]) by ucol19pa06.eemsg.mail.mil with ESMTP; 11 May 2018 00:52:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1525999963; bh=uiiyvbyTL0IlezTb5JmrhcYt3B4vgjcf02pYkj7coD8=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=alYV8b0XaAD00AYvRuG/kbQx5mn3LCxffKTMa/Y9Mz5+zDUCS9zYH4skH06kMZmYxRJY9FTQMs95jvXyvEQzYPBXRHHihrNA8GZD13v6BLXu3+ZhId7HEcs9dGBRIl3zShoh4OxvEhJfrP3yhf3PsljTlGRc1xGUGLnJUhcOQT7LLmj0oWhe5++jKnlNAMgR4eNgDlrO2sMla5A+7QuEKZnjVqYcf6Tc1F9FIXiPu1BDG3aFJt+6QeiKjgCPzIa53cQQbNhvsK4/tuC6VHkJdWdsBO8uChYzgKY8WNnobUXZOTygaRFPJ5c/lUn1r5lczYGUeQGhQMWAu28R0cVfYA== X-YMail-OSG: 1SidOJYVM1nNyhbsdp6f4MAxr3y1Bh3UyuJAW_RofSibwivA6y6peD63V7Plt91 e2nLtx1wlNtOnOslx8vzyzJFv0qSEWaySYv728wT.L1p9o921ckUtlsAgZICKVbswwG49WfT8.Ru f25NoMyMTCUMH3D8mswAEnf743Hy8nX9vj._wbnU8C.nJ_orTfpjslKuFnOCI5gR_oPS91BqwaLp aB3p7egfDCogc7TSSoMWtm7ayR9PjKL1S6kBCrarKaFMcZroAw99eErw6bT8QpuZEvO.8j82AUkr JTUpRovtZ.SifJgly41LqPAkzl0DqfoizQ0VboEJhkR5xMKe5Z3gUqNP62KN4PK2fsQcHozYfuDo 7E1kwX5isI0cMmbgDkq_0.HTFY6huSusW1vB1BIZ75x4T6kfPcL.94ZrQW9nHCKi1dKtUL5mDpXG xxeb9HyMxnwGurCMLJcsZo_yzKdPPGmQ017pNuENXsQml1Xc0BufIJh6cnGIOmJ7JfBktRV0aVZ. QsVCGzTKAclFAqInkF7DEELM._hJWZSX.1Bhu6NNyu.sB.fiBo_dCQqK.zzFcHjDA0rjJQLZt.Vo WqvkFRzq0urwXd9k_IVLS9DxiBhBa8.yaYkr2MpwbfSblPftrgx9R9WyyS_x1hMecd55cN2VcDjB NZh8- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Fri, 11 May 2018 00:52:43 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.105]) ([67.169.65.224]) by smtp401.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c399ffdade1b0be15f5f76d76fe76952; Fri, 11 May 2018 00:52:39 +0000 (UTC) To: LSM , LKLM , Paul Moore , Stephen Smalley , SE Linux , "SMACK-discuss@lists.01.org" , John Johansen , Kees Cook , Tetsuo Handa , James Morris References: <7e8702ce-2598-e0a3-31a2-bc29157fb73d@schaufler-ca.com> X-EEMSG-check-009: 444-444 From: Casey Schaufler Message-ID: Date: Thu, 10 May 2018 17:52:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <7e8702ce-2598-e0a3-31a2-bc29157fb73d@schaufler-ca.com> Content-Language: en-US X-Mailman-Approved-At: Fri, 11 May 2018 10:37:07 -0400 Subject: [PATCH 03/23] SELinux: Abstract use of cred security blob 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: Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP From: Casey Schaufler Date: Thu, 10 May 2018 13:47:57 -0700 Subject: [PATCH 03/23] SELinux: Abstract use of cred security blob Don't use the cred->security pointer directly. Provide a helper function that provides the security blob pointer. Signed-off-by: Casey Schaufler --- security/selinux/hooks.c | 54 +++++++++++++++++++-------------------- security/selinux/include/objsec.h | 5 ++++ security/selinux/xfrm.c | 4 +-- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4cafe6a19167..81b1715a1998 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -228,7 +228,7 @@ static inline u32 cred_sid(const struct cred *cred) { const struct task_security_struct *tsec; - tsec = cred->security; + tsec = selinux_cred(cred); return tsec->sid; } @@ -465,7 +465,7 @@ static int may_context_mount_sb_relabel(u32 sid, struct superblock_security_struct *sbsec, const struct cred *cred) { - const struct task_security_struct *tsec = cred->security; + const struct task_security_struct *tsec = selinux_cred(cred); int rc; rc = avc_has_perm(&selinux_state, @@ -484,7 +484,7 @@ static int may_context_mount_inode_relabel(u32 sid, struct superblock_security_struct *sbsec, const struct cred *cred) { - const struct task_security_struct *tsec = cred->security; + const struct task_security_struct *tsec = selinux_cred(cred); int rc; rc = avc_has_perm(&selinux_state, tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, @@ -1938,7 +1938,7 @@ static int may_create(struct inode *dir, struct dentry *dentry, u16 tclass) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); struct inode_security_struct *dsec; struct superblock_security_struct *sbsec; u32 sid, newsid; @@ -1960,7 +1960,7 @@ static int may_create(struct inode *dir, if (rc) return rc; - rc = selinux_determine_inode_label(current_security(), dir, + rc = selinux_determine_inode_label(selinux_cred(current_cred()), dir, &dentry->d_name, tclass, &newsid); if (rc) return rc; @@ -2467,8 +2467,8 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm) if (bprm->called_set_creds) return 0; - old_tsec = current_security(); - new_tsec = bprm->cred->security; + old_tsec = selinux_cred(current_cred()); + new_tsec = selinux_cred(bprm->cred); isec = inode_security(inode); /* Default to the current task SID. */ @@ -2632,7 +2632,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm) struct rlimit *rlim, *initrlim; int rc, i; - new_tsec = bprm->cred->security; + new_tsec = selinux_cred(bprm->cred); if (new_tsec->sid == new_tsec->osid) return; @@ -2675,7 +2675,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm) */ static void selinux_bprm_committed_creds(struct linux_binprm *bprm) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); struct itimerval itimer; u32 osid, sid; int rc, i; @@ -2978,7 +2978,7 @@ static int selinux_dentry_init_security(struct dentry *dentry, int mode, u32 newsid; int rc; - rc = selinux_determine_inode_label(current_security(), + rc = selinux_determine_inode_label(selinux_cred(current_cred()), d_inode(dentry->d_parent), name, inode_mode_to_security_class(mode), &newsid); @@ -2998,14 +2998,14 @@ static int selinux_dentry_create_files_as(struct dentry *dentry, int mode, int rc; struct task_security_struct *tsec; - rc = selinux_determine_inode_label(old->security, + rc = selinux_determine_inode_label(selinux_cred(old), d_inode(dentry->d_parent), name, inode_mode_to_security_class(mode), &newsid); if (rc) return rc; - tsec = new->security; + tsec = selinux_cred(new); tsec->create_sid = newsid; return 0; } @@ -3015,7 +3015,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir, const char **name, void **value, size_t *len) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); struct superblock_security_struct *sbsec; u32 newsid, clen; int rc; @@ -3025,7 +3025,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir, newsid = tsec->create_sid; - rc = selinux_determine_inode_label(current_security(), + rc = selinux_determine_inode_label(selinux_cred(current_cred()), dir, qstr, inode_mode_to_security_class(inode->i_mode), &newsid); @@ -3486,7 +3486,7 @@ static int selinux_inode_copy_up(struct dentry *src, struct cred **new) return -ENOMEM; } - tsec = new_creds->security; + tsec = selinux_cred(new_creds); /* Get label from overlay inode and set it in create_sid */ selinux_inode_getsecid(d_inode(src), &sid); tsec->create_sid = sid; @@ -3906,7 +3906,7 @@ static int selinux_cred_alloc_blank(struct cred *cred, gfp_t gfp) */ static void selinux_cred_free(struct cred *cred) { - struct task_security_struct *tsec = cred->security; + struct task_security_struct *tsec = selinux_cred(cred); /* * cred->security == NULL if security_cred_alloc_blank() or @@ -3926,7 +3926,7 @@ static int selinux_cred_prepare(struct cred *new, const struct cred *old, const struct task_security_struct *old_tsec; struct task_security_struct *tsec; - old_tsec = old->security; + old_tsec = selinux_cred(old); tsec = kmemdup(old_tsec, sizeof(struct task_security_struct), gfp); if (!tsec) @@ -3941,8 +3941,8 @@ static int selinux_cred_prepare(struct cred *new, const struct cred *old, */ static void selinux_cred_transfer(struct cred *new, const struct cred *old) { - const struct task_security_struct *old_tsec = old->security; - struct task_security_struct *tsec = new->security; + const struct task_security_struct *old_tsec = selinux_cred(old); + struct task_security_struct *tsec = selinux_cred(new); *tsec = *old_tsec; } @@ -3958,7 +3958,7 @@ static void selinux_cred_getsecid(const struct cred *c, u32 *secid) */ static int selinux_kernel_act_as(struct cred *new, u32 secid) { - struct task_security_struct *tsec = new->security; + struct task_security_struct *tsec = selinux_cred(new); u32 sid = current_sid(); int ret; @@ -3983,7 +3983,7 @@ static int selinux_kernel_act_as(struct cred *new, u32 secid) static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode) { struct inode_security_struct *isec = inode_security(inode); - struct task_security_struct *tsec = new->security; + struct task_security_struct *tsec = selinux_cred(new); u32 sid = current_sid(); int ret; @@ -4518,7 +4518,7 @@ static int sock_has_perm(struct sock *sk, u32 perms) static int selinux_socket_create(int family, int type, int protocol, int kern) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); u32 newsid; u16 secclass; int rc; @@ -4538,7 +4538,7 @@ static int selinux_socket_create(int family, int type, static int selinux_socket_post_create(struct socket *sock, int family, int type, int protocol, int kern) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); struct inode_security_struct *isec = inode_security_novalidate(SOCK_INODE(sock)); struct sk_security_struct *sksec; u16 sclass = socket_type_to_security_class(family, type, protocol); @@ -5398,7 +5398,7 @@ static int selinux_secmark_relabel_packet(u32 sid) const struct task_security_struct *__tsec; u32 tsid; - __tsec = current_security(); + __tsec = selinux_cred(current_cred()); tsid = __tsec->sid; return avc_has_perm(&selinux_state, @@ -6335,7 +6335,7 @@ static int selinux_getprocattr(struct task_struct *p, unsigned len; rcu_read_lock(); - __tsec = __task_cred(p)->security; + __tsec = selinux_cred(__task_cred(p)); if (current != p) { error = avc_has_perm(&selinux_state, @@ -6456,7 +6456,7 @@ static int selinux_setprocattr(const char *name, void *value, size_t size) operation. See selinux_bprm_set_creds for the execve checks and may_create for the file creation checks. The operation will then fail if the context is not permitted. */ - tsec = new->security; + tsec = selinux_cred(new); if (!strcmp(name, "exec")) { tsec->exec_sid = sid; } else if (!strcmp(name, "fscreate")) { @@ -6585,7 +6585,7 @@ static int selinux_key_alloc(struct key *k, const struct cred *cred, if (!ksec) return -ENOMEM; - tsec = cred->security; + tsec = selinux_cred(cred); if (tsec->keycreate_sid) ksec->sid = tsec->keycreate_sid; else diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index cc5e26b0161b..734b6833bdff 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -158,4 +158,9 @@ struct bpf_security_struct { u32 sid; /*SID of bpf obj creater*/ }; +static inline struct task_security_struct *selinux_cred(const struct cred *cred) +{ + return cred->security; +} + #endif /* _SELINUX_OBJSEC_H_ */ diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index 91dc3783ed94..8ffe7e1053c4 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -79,7 +79,7 @@ static int selinux_xfrm_alloc_user(struct xfrm_sec_ctx **ctxp, gfp_t gfp) { int rc; - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); struct xfrm_sec_ctx *ctx = NULL; u32 str_len; @@ -138,7 +138,7 @@ static void selinux_xfrm_free(struct xfrm_sec_ctx *ctx) */ static int selinux_xfrm_delete(struct xfrm_sec_ctx *ctx) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = selinux_cred(current_cred()); if (!ctx) return 0;