From patchwork Fri May 11 00:55:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Casey Schaufler X-Patchwork-Id: 10394437 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 624C2601A0 for ; Fri, 11 May 2018 14:41:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DB8A28EBA for ; Fri, 11 May 2018 14:41:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41D4928ECB; Fri, 11 May 2018 14:41:21 +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 EE22028ED5 for ; Fri, 11 May 2018 14:41:18 +0000 (UTC) Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.2]) by upbd19pa10.eemsg.mail.mil with ESMTP; 11 May 2018 14:41:17 +0000 X-IronPort-AV: E=Sophos;i="5.49,389,1520899200"; d="scan'208";a="11697122" IronPort-PHdr: =?us-ascii?q?9a23=3AnCkXOxA/9W1kNqBsNhDLUyQJP3N1i/DPJgcQr6?= =?us-ascii?q?AfoPdwSPr7pMqwAkXT6L1XgUPTWs2DsrQY07GQ6/iocFdDyK7JiGoFfp1IWk?= =?us-ascii?q?1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8D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/7oln82g0URfaau3ZsJcHy4BOhpI1?= =?us-ascii?q?2FYXrwhdcMCWUKvg04TOPwlF2CUSRcZ3CpUqI+4TE7DoemAp3YRoCxnrOBxj?= =?us-ascii?q?y7EodRZmBcBVCGCW3oeJmcW/cQdCKSJddskj4GVbe7V4Ah1gqutAj8y7pmMO?= =?us-ascii?q?rZ4SMYtZb+1Nl6/OLTiBcy9SBpD8iH1GGNVW50lHsSRzAqxKB/vVB9ylCb3K?= =?us-ascii?q?l2gvxYEdlT6O1TUgohO57T0fF1C9foWg3bZteJUlGmQte4Dj4tUtI92dgOY1?= =?us-ascii?q?xyG9+6lBDMwzKqA6MJl7yMHJE7777T3332J8Z713bKybIsj0c4TctVNG2nh6?= =?us-ascii?q?l/9w7JC47PjUqZi76gdb4A0y7V6GeD0W2OsVlFXw5sS6rFR2sSaVfRrdT8+k?= =?us-ascii?q?zNVaSuCag9PgtH18GCNrNAasf1glVeWPfjJNPebnqvlGeoHxmI3LKMbJHxdm?= =?us-ascii?q?UFxirdEkkEkxsL/XaCLwcxGjmur3jZDDx0GlLle1ns/vVmqHOnUk80yBmHbk?= =?us-ascii?q?1g1rqy/B4YnvmcS/cK0rIFvictsTN0E0yn39LVCtqAuRRucL9aYdwj/FdNzX?= =?us-ascii?q?jZuBBlPpy8M6BigUYTcwptv0z00RV4FoRAkdMxoXMv1ApyKLuU0EhPdjODx5?= =?us-ascii?q?zwPafXKmbq9hC1d6HWwk3e0MqR+qoX6/Q3sVbjvAa0Fkc58HVoydpV03yB5p?= =?us-ascii?q?nQCwoSS53xWF4t9xdmv7HafjU954TM2HJ2LKa0qD7C1MwzBOY+0BmvY9JfPL?= =?us-ascii?q?mDFA/oHM0QH9KuJ/Aym1i1chIEO/hf9LQpMMy7bPaG16urPel6kDKgk2tH/J?= =?us-ascii?q?h30liQ+CpkVu7Iw5EFzumD3guJTTf8i0yhstzslIBfYzESGWS+yS3+C45XfK?= =?us-ascii?q?Fye5gECXu2Kc2t2tp+n4LtW2Jf9FO7CVIJwsupeQaMYFznxg1dzloXrmK9mS?= =?us-ascii?q?Sj0jx0lislrq2F3CzB2+7ibgYIOnZXRGl+ilfhOY60j9EeXEiscQcpjwCo6l?= =?us-ascii?q?zkyKhBo6RzNW7TQV1HfyLuNWFtTrOwtqaeY85I8J4oryRXX/igYVCdUL7xuQ?= =?us-ascii?q?cV0yPkH2tYyzA2bDWqupT/nxNgkmKdK2x/rH3DecF/3R3f/sDTReZN3joaQy?= =?us-ascii?q?l1kT3XBlmnP9m15NmUjInMsuS/V2KnS51SfjLmzZiYtCu6421qAAGwn+uplt?= =?us-ascii?q?3hDwc6zTfx18N2WiXQsBb8fo7r2rygMeJgekloAEHz69BmFYF5nIo9n4oQ2W?= =?us-ascii?q?UGiZWO53YHln3zMdpD06LkcHUNXSILw8LS4AX9201sMHSJx5niW3We3MRhYc?= =?us-ascii?q?K6YmUI1SIh9cxKD72U7LNclytvvlW4tR7RYeR6njoF0fsh8mMag+UXtwo11C?= =?us-ascii?q?qdBKwSEldCPSH3ihSI9M6xrL9MZGq1ariw01d+ncq9A76crAFcX2z5epg8Ei?= =?us-ascii?q?Nq6MVwLk7M2mXp6o74YNnQcc4TthqMnhfeiehaNYk8luQMhSV6OWLxp3slxP?= =?us-ascii?q?AnjRZ2x5G1oJCHK3lx/KK+GhNYLif6Z94X+jz2kalen9qW3oC2EpVvADoLWo?= =?us-ascii?q?HkTfWyEDIdrf7nLRqBECUgqneHHrrSBQGf511gr3LTFJCrMmqaJHcHwtp/Qx?= =?us-ascii?q?mdPlZQgBgOXDU9nJ42CBylxND7fEd+/DAR6UbyqgFQxeJwKxn/TmDfqR+taj?= =?us-ascii?q?guTJifKARZ7h1e50jPK8OT9eRzED9E/p26sAOCMHSbaBpSAWEPREOEG0jpPq?= =?us-ascii?q?Oy6tnY7+iYGu2+IuPAYbWUt+NRSuyIyoip0ot6+DaMLd6CMWN+AP0+wEZDWm?= =?us-ascii?q?p5G8vBkTUVVyMXjz7Nb9KcpBqk/C13tNqw8OzzWA/064uPCqFSMc5z+xC4gK?= =?us-ascii?q?eDMfSfhCBlJjZZzJwMwWXEyL8F3F4dkytubSWiEawctS7RS6LdgrdXAAAAZC?= =?us-ascii?q?xtMstI7r483g5WNM7alNz6yKB3guQyC1dfWlzrgtupatASI2GhKFPHA16GO6?= =?us-ascii?q?+dKjHMx8H3YLi8SaFLjOlOrB2/pyqUH1X4PjudkznpVhavMfxDjSyAIBNfuJ?= =?us-ascii?q?u9cgt2CWT5QtPpcAG7MMRwjT0w27E0gWnKNWEEOzhmb0xNtqGQ7T9fgvhnAG?= =?us-ascii?q?NB73VlLe6CmyuC8ubXNI0ZsfpxDSRyje5a5246y7RN5iFeWPN1gDfSrsJpo1?= =?us-ascii?q?y+iOaPxSBoUARQpTtQg4KLpVttOaPc9pZaWHbE+AkC7WKfChgQoNtlENLvsb?= =?us-ascii?q?hKytfTjKLzNCtC89XM8MsAAMjULdiLMGAmMRvoBjHUChAKTSSsNW7BhExQi+?= =?us-ascii?q?2d9nqQrpcmsJfsg4YORqVdVFMrCvMQEl5lE8AaIJdrQjMklqaWjMwI5Xu+tB?= =?us-ascii?q?nRQ8FavpHbVv2MGvjvLTeZjaVeZxQW27/4Kp4TNoLj0Ux4dlZ6hJjKG1bXXd?= =?us-ascii?q?1VoS1gbgs0r1tW/Xh7SW0z1UzlZR2x4H8PFf60mRs2hRVkbeQr6jjs/089Jk?= =?us-ascii?q?DWqysojEkxhdLljCiXcDHvNqiwWZpbCynzt0gqLpP0WQB1bRaxnUxlLjvEQa?= =?us-ascii?q?xej6d4f2BxlADcoYdPGeJbTaBceh8f2+qXaOsy3lRGtiqnxVRK6vDECZt4iQ?= =?us-ascii?q?QqdpCsr2pa2w19bN85P6rQK7RVzlJInKKBojeo1vwtwA8ZP0sC7WSSeCgOuE?= =?us-ascii?q?MVKLYmIyuo8/d25gOcgTtDf3IAV/0wovJl7kk9IfiPzzr8075fLUC8L/GQIL?= =?us-ascii?q?mHu2jBiMGIWUg92Vk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rDqRt/vrrQro0?= =?us-ascii?q?6S4/wkm6IJemxxeQKnC/IRVs8axmfn1qAq1jkhE8bMErPv4vJDUGg5nj34kZ?= =?us-ascii?q?BnA1oWAu8UHaaM/YlGgmg3gejZOcMNcqBemmePEgWpEqQexn6q9SSXJnVlgh?= =?us-ascii?q?DU3B3qR2O88kP2pzdiQSTQ19fjjlZVVr6vCEdWRCqpPE91vSiBPAX2qdX3vr?= =?us-ascii?q?4141suMmz+s9KNlnWuN69LH8HlI9ycOyY0rkoNjJItXtyvxZwbGd2lLdcT8X?= =?us-ascii?q?F+a+DT62a1nC5BvahHnYve4sea+vnNG3mvkbGaoa2XxD9E0ng4oU0/6te4O/?= =?us-ascii?q?HP5tyFWe6n2HoKQidkpQTBQwC6paDBo1ATI0yL31/BmJYWMdFBwXk4ykbm6f?= =?us-ascii?q?A4T9Iy7wVfGJzPZ/EDpTDvIDv720ufY9YsWyaC1DtYA0z6HkNlGKgm32Lwpt?= =?us-ascii?q?jGmW3X+10ySYl6b1bnigBvD4UkNUIt70AawjIZHggRdR+bDL+pBUP/LYsHTE?= =?us-ascii?q?QDcgqI3Ly7eqcxwE1yzaii5PfJYuxgG6UNNvhcjgmUnFhYAJ4WsrMRQKh6e1?= =?us-ascii?q?BD8K7bvA/iC5LoX/L+j3o/KeW1QtxG8cAer3Yi7RywRwC+5pdf77YWk5SIdq?= =?us-ascii?q?9YYZfSvMBz9Vpn5SUVeixLnhd/kwuzUfoAq+D7/tjbrJ2o5/6hVKkzQeUX6x?= =?us-ascii?q?80B2N5g5vrnl8jpdDX1+FBSozakon/9B5CI2SKuYnAyRV8L/QBK56zdrZ663?= =?us-ascii?q?oHPzQeJ24JPdeOd/Y84TViPynI6lNeBcMMYdcYPMvTlgBOlk3mRq1c9srBFl?= =?us-ascii?q?+fEYdzeNgi73DrxzAt7Zs8TuHg5SezJZDY6VFNI/xDgzt3mdLHpega2/zSBz?= =?us-ascii?q?YL4XiXbBh12CCCy4KXB/b24+qM1MneV0ka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us-ascii?q?u0gBr12baR1H3etODbTWZrZkU0hKQHAW3SpXsIJGIFDoQNsVr2Cu6bZklK3W?= =?us-ascii?q?40k+8mxRIWeQpyX3Evmn1blfqwAItYHHYFhWOpR7sNa1V6?= X-IPAS-Result: =?us-ascii?q?A2DICQD6qvVa/wHyM5BcGwEBAQEDAQEBCQEBAYNAA4FcK?= =?us-ascii?q?INyiGKMEYF5gQ+BQJNfMRMBhQeCQyE4FAECAQEBAQEBAgFrHAyCNSSCTwEDA?= =?us-ascii?q?wECIAQZAQE4AgMJAQEbAwECAwIiBAICAwFBCggGAQwGAgEBAYMegWkDFQOhS?= =?us-ascii?q?IoYbYFpM4JvAQEFgQIBAV6CNAOBNYJACBdyhHiCJIITgQ8jgjqIIYJUhzqFQ?= =?us-ascii?q?Ys4CY5LZIcThHiLNYZKMyGBUk0jFYJ+ghQMF4NFihwBVU96AQGQFQEB?= Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 11 May 2018 14:41:16 +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 w4BEfF96003593; Fri, 11 May 2018 10:41:16 -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 w4B0thPP007193 for ; Thu, 10 May 2018 20:55:43 -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 w4B0toYX001870 for ; Thu, 10 May 2018 20:55:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1AHBACs6fRalywYGNZcHQIFDINBgV8og?= =?us-ascii?q?3GIYIwQgXmBD4FAk2uEdwJFgjshOBQBAgEBAQEBAQIUAQEBAQEGGAZLhTQBAwM?= =?us-ascii?q?jBBkBATgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFQOgaYoYbYFpM4JvAQEFg?= =?us-ascii?q?QIBAV6COgOBNYJACBdyhHiCJIITgQ8jiluCVIc4hUGLNgmOSWSHEoR1giuJB4Z?= =?us-ascii?q?JM4FzTSMVgn6CIA4JEYM0ihwBVU+QOwEB?= X-IPAS-Result: =?us-ascii?q?A1AHBACs6fRalywYGNZcHQIFDINBgV8og3GIYIwQgXmBD4F?= =?us-ascii?q?Ak2uEdwJFgjshOBQBAgEBAQEBAQIUAQEBAQEGGAZLhTQBAwMjBBkBATgPHAMBA?= =?us-ascii?q?gMCJgICRQoIBgEMBgIBAYMfgWkDFQOgaYoYbYFpM4JvAQEFgQIBAV6COgOBNYJ?= =?us-ascii?q?ACBdyhHiCJIITgQ8jiluCVIc4hUGLNgmOSWSHEoR1giuJB4ZJM4FzTSMVgn6CI?= =?us-ascii?q?A4JEYM0ihwBVU+QOwEB?= X-IronPort-AV: E=Sophos;i="5.49,387,1520913600"; d="scan'208";a="274416" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.35]) by goalie.tycho.ncsc.mil with ESMTP; 10 May 2018 20:55:31 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AG8hnwxyJI+RLBkTXCy+O+j09IxM/srCxBDY+r6?= =?us-ascii?q?Qd0ugXLvad9pjvdHbS+e9qxAeQG9mDsLQc06L/iOPJYSQ4+5GPsXQPItRndi?= =?us-ascii?q?QuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBg?= =?us-ascii?q?vwNRZvJuTyB4Xek9m72/q99pHPbQhEniaxba9vJxiqsAvdsdUbj5F/Iagr0B?= =?us-ascii?q?vJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PG?= =?us-ascii?q?Av5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1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78Th5HozJyG2WZ31llWMPATkt1eZwplIrjh+4/O?= =?us-ascii?q?BcgvpFBZQH/P5NUwEnJbbA3ud6DJb0QQuHcdCXHhLuCO6DKBoSC94w2NQTeF?= =?us-ascii?q?1VH9S5kguFh3PsBKUa3fTfP7kd2YGZ03nqLNtm0F7C1bI9lB9+G41IL2Lwwu?= =?us-ascii?q?Zd8AjVT6zOk0yfjKusPfAe2y7LsmWEzWOIp0xeeAV5V6LDXHsWYg3dqtGvog?= =?us-ascii?q?vhQrK1QZ8gNQgJnc2PJ7BBbdrqpV5GXvDmOcnbJWWrlDH0TSqF2qiRa8LKcm?= =?us-ascii?q?MR1W2JEEUCnB0S+zOFOBI4CyOJoifaCyJjU0nmYF72+K94pTW5VhlwhyODak?= =?us-ascii?q?B6n5+y4AQUnrTISfYUxKgFow8nojB5HRC6xd2AWPSaoA80V6xHbMJ121xH3H?= =?us-ascii?q?/XswFndsirJrtvl3YFeAR+ok3q2g8yAYwGms8v+iB5hDFuIL6VhQsSPwiT2o?= =?us-ascii?q?r9b/iHcjOorhmyd67b3E3f29+K+6AJre41sEjnoBr2SRgf2FJDiPJt+iPHoJ?= =?us-ascii?q?jHCREdF5f4U0Jx8hl+9PnWYSg4spvdzmYkcbK1vTnLx88zCaM7xwyhcdZSPO?= =?us-ascii?q?LMFAL7H8AAQcn7AP0jm1+uKBkDOe0=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0C6AwC66PRalywYGNZcHQIFDINBgV8?= =?us-ascii?q?og3GIYIwQgXmBD4FAk2uEdwJFgjshOBQBAgEBAQEBAQIBEwEBAQEBBhgGSwy?= =?us-ascii?q?CNSSCTwEDAyMEGQEBOA8cAwECAwImAgJFCggGAQwGAgEBgx+BaQMVA6Boihh?= =?us-ascii?q?tgWkzgm8BAQWBAgEBXoI6A4E1gkAIF3KEeIIkghOBDyOKW4JUhziFQYs2CY5?= =?us-ascii?q?JZIcShHWCK4kHhkkzgXNNIxWCfoIgDgkRgzSKHAFVT5A7AQE?= X-IPAS-Result: =?us-ascii?q?A0C6AwC66PRalywYGNZcHQIFDINBgV8og3GIYIwQgXmBD?= =?us-ascii?q?4FAk2uEdwJFgjshOBQBAgEBAQEBAQIBEwEBAQEBBhgGSwyCNSSCTwEDAyMEG?= =?us-ascii?q?QEBOA8cAwECAwImAgJFCggGAQwGAgEBgx+BaQMVA6BoihhtgWkzgm8BAQWBA?= =?us-ascii?q?gEBXoI6A4E1gkAIF3KEeIIkghOBDyOKW4JUhziFQYs2CY5JZIcShHWCK4kHh?= =?us-ascii?q?kkzgXNNIxWCfoIgDgkRgzSKHAFVT5A7AQE?= X-IronPort-AV: E=Sophos;i="5.49,387,1520899200"; d="scan'208";a="13170993" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from ucol3cpa06.eemsg.mail.mil ([214.24.24.44]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 11 May 2018 00:55:31 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;2998405f-cfda-49ce-b84e-021d966231f3 Authentication-Results: UCOL3CPA03.eemsg.mail.mil; dkim=pass (signature verified) header.i=@yahoo.com X-EEMSG-check-008: 519412200|UCOL3CPA03_EEMSG_MP18.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: A0CgAgAs6fRah1q9o0JcHQIFDIUgKINxiGCOCYEPgUCTa4R3AkWCOyE4FAECAQEBAQEBAhQBAQEKCwkIKCMMhSgBAwMjBBkBATgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFaBsihhtgWkzgm8BAQWBAgEBXoI6A4E1gkAIF3KEeIQ3gQ8jgjqIIYJUhziFQYs2CY5JZIcShHWLMoZJM4FzTSMVgn6CIA4Jg0WKHAFVHzCQOwEB X-IPAS-Result: A0CgAgAs6fRah1q9o0JcHQIFDIUgKINxiGCOCYEPgUCTa4R3AkWCOyE4FAECAQEBAQEBAhQBAQEKCwkIKCMMhSgBAwMjBBkBATgPHAMBAgMCJgICRQoIBgEMBgIBAYMfgWkDFaBsihhtgWkzgm8BAQWBAgEBXoI6A4E1gkAIF3KEeIQ3gQ8jgjqIIYJUhziFQYs2CY5JZIcShHWLMoZJM4FzTSMVgn6CIA4Jg0WKHAFVHzCQOwEB Received: from sonic306-28.consmr.mail.ne1.yahoo.com ([66.163.189.90]) by UCOL3CPA03.eemsg.mail.mil with ESMTP; 11 May 2018 00:55:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1526000129; bh=b35Van1Dl4IiEwt/9LwlQBwYb4TKZFaguggjn0wgdE4=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=nPshzXAHvvskTstLAVuetVwbrwXzEdPOmgycCMhRTyCvQRCk/OWna/A9++o9A8tFTBmVkSyWdJx6wpnbtXRiw9+KvkmWc9z7BKrtzSe98TxIbhuYgr420jXRsfC2cr5yYeXsFzbrkkfW9rU8gQujrCw2DqBd8rBisNny5KjbjSy+yAFnEk6lCVH/IGCeZ4N6bRECrwPYO0ER5gL/dqsHFKBUfFq0jf1r1PTn0JAWzNv0JuD5+Xurnyym9QnhJfqCRk5mOE4JHJBpTrRJJfn5SavNQ+sesw0THanJTllm9pC+r5lWLDUDF1AXq5VswyhHTmNYNAqQP9tfvClVlKW35Q== X-YMail-OSG: iaOgK6kVM1nEqRAGkf3i17QYBAHMYYVaqGgGKChxTlu3OBejWG7nJ51uJcq4AhE KiGw2gVxOHZPJzuZQ0WvWIu.ASUh9CrNkPt3dta1JHwAqUvaOGg7lW6HXMHkG28Nj8UQuN8nlWdl XOCJZ2yNygXUY6TWFwga2djgCxLq7qkt2ZWpCzogdm3rM.DnrtLS5TjJWB5bfhweimzzgb_u1iV5 57ovW5kpwjUHZVBOpR3FxAyXYjajZMZpXO.sl0bn7VrDm84b3zdAWjqiuZlCzxSoi7AwU4IScsox _fd7F16DbfFwLQTu.T8W0a02_up.wnLuHEroSH26TzwzTr5x.xRESdTHcqAskkc1oCxVyBH7s0Vf a3DSA5rcsUrCSbvHJHB1vqINaj.K5cbsDp4AEWXaxCrTLXtWIyhB27lvrtjtIP.nF28FUYyxXjEI Lp5WnJuSmHBJp_Prz.uIoMuYBnRsd3r2z7Qj2pi1tvLkKaYENzMGy3STGnzjU52pUGiihZzRgg2N EJl44pzdwhnANEhXAa30XxX.fnpvszEFNbu60Wsx_g7X5zrb_BFUq2B9UpfdHYoNnFVXE6.DJ4Fy tLgrzvUPcYkf2xB2SxCgN.kfaqdEduENIkBTPXGs0miLEMbZUVcc7lyEGuPe0NBfAqyOQ9B5asKX rV20- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Fri, 11 May 2018 00:55:29 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.105]) ([67.169.65.224]) by smtp402.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 7d39446d29daf0e8aad116fef554970a; Fri, 11 May 2018 00:55:27 +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:55:24 -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:08 -0400 Subject: [PATCH 17/23] LSM: Allow mount options from multiple security modules 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 15:10:46 -0700 Subject: [PATCH 17/23] LSM: Allow mount options from multiple security modules Both SELinux and Smack use mount options that apply to filesystems generally. Remove the failure case where the security modules don't recognize an option. SELinux does not recognize Smack's options, and vis versa. The btrfs code had some misconceptions about the generality of security modules and mount options. That has been corrected. Signed-off-by: Casey Schaufler --- fs/btrfs/super.c | 10 +++--- include/linux/security.h | 45 ++++++++++++++++------- security/security.c | 14 ++++++-- security/selinux/hooks.c | 90 +++++++++++++++++++++++----------------------- security/smack/smack_lsm.c | 54 ++++++++++++++-------------- 5 files changed, 122 insertions(+), 91 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0628092b0b1b..a678d956248f 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1487,15 +1487,15 @@ static int setup_security_options(struct btrfs_fs_info *fs_info, return ret; #ifdef CONFIG_SECURITY - if (!fs_info->security_opts.num_mnt_opts) { + if (fs_info->security_opts.selinux.num_mnt_opts != 0 || + fs_info->security_opts.smack.num_mnt_opts != 0) { /* first time security setup, copy sec_opts to fs_info */ memcpy(&fs_info->security_opts, sec_opts, sizeof(*sec_opts)); } else { /* - * Since SELinux (the only one supporting security_mnt_opts) - * does NOT support changing context during remount/mount of - * the same sb, this must be the same or part of the same - * security options, just free it. + * Since no modules support changing context during + * remount/mount of the same sb, this must be the same + * or part of the same security options, just free it. */ security_free_mnt_opts(sec_opts); } diff --git a/include/linux/security.h b/include/linux/security.h index 9afe7a509030..221665f411c0 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -161,34 +161,55 @@ typedef int (*initxattrs) (struct inode *inode, #ifdef CONFIG_SECURITY -struct security_mnt_opts { +struct lsm_mnt_opts { char **mnt_opts; int *mnt_opts_flags; int num_mnt_opts; }; + +struct security_mnt_opts { +#ifdef CONFIG_SECURITY_STACKING + struct lsm_mnt_opts selinux; + struct lsm_mnt_opts smack; +#else + union { + struct lsm_mnt_opts selinux; + struct lsm_mnt_opts smack; + }; +#endif +}; + int call_lsm_notifier(enum lsm_event event, void *data); int register_lsm_notifier(struct notifier_block *nb); int unregister_lsm_notifier(struct notifier_block *nb); static inline void security_init_mnt_opts(struct security_mnt_opts *opts) { - opts->mnt_opts = NULL; - opts->mnt_opts_flags = NULL; - opts->num_mnt_opts = 0; + memset(opts, 0, sizeof(*opts)); } static inline void security_free_mnt_opts(struct security_mnt_opts *opts) { int i; - if (opts->mnt_opts) - for (i = 0; i < opts->num_mnt_opts; i++) - kfree(opts->mnt_opts[i]); - kfree(opts->mnt_opts); - opts->mnt_opts = NULL; - kfree(opts->mnt_opts_flags); - opts->mnt_opts_flags = NULL; - opts->num_mnt_opts = 0; + + if (opts->selinux.mnt_opts) + for (i = 0; i < opts->selinux.num_mnt_opts; i++) + kfree(opts->selinux.mnt_opts[i]); + kfree(opts->selinux.mnt_opts); + opts->selinux.mnt_opts = NULL; + kfree(opts->selinux.mnt_opts_flags); + opts->selinux.mnt_opts_flags = NULL; + opts->selinux.num_mnt_opts = 0; + + if (opts->smack.mnt_opts) + for (i = 0; i < opts->smack.num_mnt_opts; i++) + kfree(opts->smack.mnt_opts[i]); + kfree(opts->smack.mnt_opts); + opts->smack.mnt_opts = NULL; + kfree(opts->smack.mnt_opts_flags); + opts->smack.mnt_opts_flags = NULL; + opts->smack.num_mnt_opts = 0; } /* prototypes */ diff --git a/security/security.c b/security/security.c index e0f01cdd1830..3d1293e8b19b 100644 --- a/security/security.c +++ b/security/security.c @@ -782,9 +782,17 @@ int security_sb_set_mnt_opts(struct super_block *sb, unsigned long kern_flags, unsigned long *set_kern_flags) { - return call_int_hook(sb_set_mnt_opts, - opts->num_mnt_opts ? -EOPNOTSUPP : 0, sb, - opts, kern_flags, set_kern_flags); + int nobody = 0; + + /* + * Additional security modules that use mount options + * need to be added here. + */ + if (opts->selinux.num_mnt_opts != 0 || opts->smack.num_mnt_opts != 0) + nobody = -EOPNOTSUPP; + + return call_int_hook(sb_set_mnt_opts, nobody, sb, opts, kern_flags, + set_kern_flags); } EXPORT_SYMBOL(security_sb_set_mnt_opts); diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 1b81b74b8f84..47f672152892 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -569,21 +569,23 @@ static int selinux_get_mnt_opts(const struct super_block *sb, /* count the number of mount options for this sb */ for (i = 0; i < NUM_SEL_MNT_OPTS; i++) { if (tmp & 0x01) - opts->num_mnt_opts++; + opts->selinux.num_mnt_opts++; tmp >>= 1; } /* Check if the Label support flag is set */ if (sbsec->flags & SBLABEL_MNT) - opts->num_mnt_opts++; + opts->selinux.num_mnt_opts++; - opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC); - if (!opts->mnt_opts) { + opts->selinux.mnt_opts = kcalloc(opts->selinux.num_mnt_opts, + sizeof(char *), GFP_ATOMIC); + if (!opts->selinux.mnt_opts) { rc = -ENOMEM; goto out_free; } - opts->mnt_opts_flags = kcalloc(opts->num_mnt_opts, sizeof(int), GFP_ATOMIC); - if (!opts->mnt_opts_flags) { + opts->selinux.mnt_opts_flags = kcalloc(opts->selinux.num_mnt_opts, + sizeof(int), GFP_ATOMIC); + if (!opts->selinux.mnt_opts_flags) { rc = -ENOMEM; goto out_free; } @@ -594,8 +596,8 @@ static int selinux_get_mnt_opts(const struct super_block *sb, &context, &len); if (rc) goto out_free; - opts->mnt_opts[i] = context; - opts->mnt_opts_flags[i++] = FSCONTEXT_MNT; + opts->selinux.mnt_opts[i] = context; + opts->selinux.mnt_opts_flags[i++] = FSCONTEXT_MNT; } if (sbsec->flags & CONTEXT_MNT) { rc = security_sid_to_context(&selinux_state, @@ -603,16 +605,16 @@ static int selinux_get_mnt_opts(const struct super_block *sb, &context, &len); if (rc) goto out_free; - opts->mnt_opts[i] = context; - opts->mnt_opts_flags[i++] = CONTEXT_MNT; + opts->selinux.mnt_opts[i] = context; + opts->selinux.mnt_opts_flags[i++] = CONTEXT_MNT; } if (sbsec->flags & DEFCONTEXT_MNT) { rc = security_sid_to_context(&selinux_state, sbsec->def_sid, &context, &len); if (rc) goto out_free; - opts->mnt_opts[i] = context; - opts->mnt_opts_flags[i++] = DEFCONTEXT_MNT; + opts->selinux.mnt_opts[i] = context; + opts->selinux.mnt_opts_flags[i++] = DEFCONTEXT_MNT; } if (sbsec->flags & ROOTCONTEXT_MNT) { struct dentry *root = sbsec->sb->s_root; @@ -622,15 +624,15 @@ static int selinux_get_mnt_opts(const struct super_block *sb, &context, &len); if (rc) goto out_free; - opts->mnt_opts[i] = context; - opts->mnt_opts_flags[i++] = ROOTCONTEXT_MNT; + opts->selinux.mnt_opts[i] = context; + opts->selinux.mnt_opts_flags[i++] = ROOTCONTEXT_MNT; } if (sbsec->flags & SBLABEL_MNT) { - opts->mnt_opts[i] = NULL; - opts->mnt_opts_flags[i++] = SBLABEL_MNT; + opts->selinux.mnt_opts[i] = NULL; + opts->selinux.mnt_opts_flags[i++] = SBLABEL_MNT; } - BUG_ON(i != opts->num_mnt_opts); + BUG_ON(i != opts->selinux.num_mnt_opts); return 0; @@ -676,9 +678,9 @@ static int selinux_set_mnt_opts(struct super_block *sb, struct inode_security_struct *root_isec; u32 fscontext_sid = 0, context_sid = 0, rootcontext_sid = 0; u32 defcontext_sid = 0; - char **mount_options = opts->mnt_opts; - int *flags = opts->mnt_opts_flags; - int num_opts = opts->num_mnt_opts; + char **mount_options = opts->selinux.mnt_opts; + int *flags = opts->selinux.mnt_opts_flags; + int num_opts = opts->selinux.num_mnt_opts; mutex_lock(&sbsec->lock); @@ -1039,7 +1041,7 @@ static int selinux_parse_opts_str(char *options, char *fscontext = NULL, *rootcontext = NULL; int rc, num_mnt_opts = 0; - opts->num_mnt_opts = 0; + opts->selinux.num_mnt_opts = 0; /* Standard string-based options. */ while ((p = strsep(&options, "|")) != NULL) { @@ -1106,41 +1108,39 @@ static int selinux_parse_opts_str(char *options, case Opt_labelsupport: break; default: - rc = -EINVAL; printk(KERN_WARNING "SELinux: unknown mount option\n"); - goto out_err; - + break; } } rc = -ENOMEM; - opts->mnt_opts = kcalloc(NUM_SEL_MNT_OPTS, sizeof(char *), GFP_KERNEL); - if (!opts->mnt_opts) + opts->selinux.mnt_opts = kcalloc(NUM_SEL_MNT_OPTS, sizeof(char *), GFP_KERNEL); + if (!opts->selinux.mnt_opts) goto out_err; - opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), + opts->selinux.mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), GFP_KERNEL); - if (!opts->mnt_opts_flags) + if (!opts->selinux.mnt_opts_flags) goto out_err; if (fscontext) { - opts->mnt_opts[num_mnt_opts] = fscontext; - opts->mnt_opts_flags[num_mnt_opts++] = FSCONTEXT_MNT; + opts->selinux.mnt_opts[num_mnt_opts] = fscontext; + opts->selinux.mnt_opts_flags[num_mnt_opts++] = FSCONTEXT_MNT; } if (context) { - opts->mnt_opts[num_mnt_opts] = context; - opts->mnt_opts_flags[num_mnt_opts++] = CONTEXT_MNT; + opts->selinux.mnt_opts[num_mnt_opts] = context; + opts->selinux.mnt_opts_flags[num_mnt_opts++] = CONTEXT_MNT; } if (rootcontext) { - opts->mnt_opts[num_mnt_opts] = rootcontext; - opts->mnt_opts_flags[num_mnt_opts++] = ROOTCONTEXT_MNT; + opts->selinux.mnt_opts[num_mnt_opts] = rootcontext; + opts->selinux.mnt_opts_flags[num_mnt_opts++] = ROOTCONTEXT_MNT; } if (defcontext) { - opts->mnt_opts[num_mnt_opts] = defcontext; - opts->mnt_opts_flags[num_mnt_opts++] = DEFCONTEXT_MNT; + opts->selinux.mnt_opts[num_mnt_opts] = defcontext; + opts->selinux.mnt_opts_flags[num_mnt_opts++] = DEFCONTEXT_MNT; } - opts->num_mnt_opts = num_mnt_opts; + opts->selinux.num_mnt_opts = num_mnt_opts; return 0; out_err: @@ -1185,15 +1185,15 @@ static void selinux_write_opts(struct seq_file *m, int i; char *prefix; - for (i = 0; i < opts->num_mnt_opts; i++) { + for (i = 0; i < opts->selinux.num_mnt_opts; i++) { char *has_comma; - if (opts->mnt_opts[i]) - has_comma = strchr(opts->mnt_opts[i], ','); + if (opts->selinux.mnt_opts[i]) + has_comma = strchr(opts->selinux.mnt_opts[i], ','); else has_comma = NULL; - switch (opts->mnt_opts_flags[i]) { + switch (opts->selinux.mnt_opts_flags[i]) { case CONTEXT_MNT: prefix = CONTEXT_STR; break; @@ -1219,7 +1219,7 @@ static void selinux_write_opts(struct seq_file *m, seq_puts(m, prefix); if (has_comma) seq_putc(m, '\"'); - seq_escape(m, opts->mnt_opts[i], "\"\n\\"); + seq_escape(m, opts->selinux.mnt_opts[i], "\"\n\\"); if (has_comma) seq_putc(m, '\"'); } @@ -2794,10 +2794,10 @@ static int selinux_sb_remount(struct super_block *sb, void *data) if (rc) goto out_free_secdata; - mount_options = opts.mnt_opts; - flags = opts.mnt_opts_flags; + mount_options = opts.selinux.mnt_opts; + flags = opts.selinux.mnt_opts_flags; - for (i = 0; i < opts.num_mnt_opts; i++) { + for (i = 0; i < opts.selinux.num_mnt_opts; i++) { u32 sid; if (flags[i] == SBLABEL_MNT) diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 4cc3d6e04e10..6528757ef6c0 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -601,7 +601,7 @@ static int smack_parse_opts_str(char *options, int num_mnt_opts = 0; int token; - opts->num_mnt_opts = 0; + opts->smack.num_mnt_opts = 0; if (!options) return 0; @@ -651,43 +651,45 @@ static int smack_parse_opts_str(char *options, goto out_err; break; default: - rc = -EINVAL; pr_warn("Smack: unknown mount option\n"); - goto out_err; + break; } } - opts->mnt_opts = kcalloc(NUM_SMK_MNT_OPTS, sizeof(char *), GFP_KERNEL); - if (!opts->mnt_opts) + opts->smack.mnt_opts = kcalloc(NUM_SMK_MNT_OPTS, sizeof(char *), + GFP_KERNEL); + if (!opts->smack.mnt_opts) goto out_err; - opts->mnt_opts_flags = kcalloc(NUM_SMK_MNT_OPTS, sizeof(int), - GFP_KERNEL); - if (!opts->mnt_opts_flags) + opts->smack.mnt_opts_flags = kcalloc(NUM_SMK_MNT_OPTS, sizeof(int), + GFP_KERNEL); + if (!opts->smack.mnt_opts_flags) { + kfree(opts->smack.mnt_opts); goto out_err; + } if (fsdefault) { - opts->mnt_opts[num_mnt_opts] = fsdefault; - opts->mnt_opts_flags[num_mnt_opts++] = FSDEFAULT_MNT; + opts->smack.mnt_opts[num_mnt_opts] = fsdefault; + opts->smack.mnt_opts_flags[num_mnt_opts++] = FSDEFAULT_MNT; } if (fsfloor) { - opts->mnt_opts[num_mnt_opts] = fsfloor; - opts->mnt_opts_flags[num_mnt_opts++] = FSFLOOR_MNT; + opts->smack.mnt_opts[num_mnt_opts] = fsfloor; + opts->smack.mnt_opts_flags[num_mnt_opts++] = FSFLOOR_MNT; } if (fshat) { - opts->mnt_opts[num_mnt_opts] = fshat; - opts->mnt_opts_flags[num_mnt_opts++] = FSHAT_MNT; + opts->smack.mnt_opts[num_mnt_opts] = fshat; + opts->smack.mnt_opts_flags[num_mnt_opts++] = FSHAT_MNT; } if (fsroot) { - opts->mnt_opts[num_mnt_opts] = fsroot; - opts->mnt_opts_flags[num_mnt_opts++] = FSROOT_MNT; + opts->smack.mnt_opts[num_mnt_opts] = fsroot; + opts->smack.mnt_opts_flags[num_mnt_opts++] = FSROOT_MNT; } if (fstransmute) { - opts->mnt_opts[num_mnt_opts] = fstransmute; - opts->mnt_opts_flags[num_mnt_opts++] = FSTRANS_MNT; + opts->smack.mnt_opts[num_mnt_opts] = fstransmute; + opts->smack.mnt_opts_flags[num_mnt_opts++] = FSTRANS_MNT; } - opts->num_mnt_opts = num_mnt_opts; + opts->smack.num_mnt_opts = num_mnt_opts; return 0; out_opt_err: @@ -726,7 +728,7 @@ static int smack_set_mnt_opts(struct super_block *sb, struct inode_smack *isp; struct smack_known *skp; int i; - int num_opts = opts->num_mnt_opts; + int num_opts = opts->smack.num_mnt_opts; int transmute = 0; if (sp->smk_flags & SMK_SB_INITIALIZED) @@ -760,33 +762,33 @@ static int smack_set_mnt_opts(struct super_block *sb, sp->smk_flags |= SMK_SB_INITIALIZED; for (i = 0; i < num_opts; i++) { - switch (opts->mnt_opts_flags[i]) { + switch (opts->smack.mnt_opts_flags[i]) { case FSDEFAULT_MNT: - skp = smk_import_entry(opts->mnt_opts[i], 0); + skp = smk_import_entry(opts->smack.mnt_opts[i], 0); if (IS_ERR(skp)) return PTR_ERR(skp); sp->smk_default = skp; break; case FSFLOOR_MNT: - skp = smk_import_entry(opts->mnt_opts[i], 0); + skp = smk_import_entry(opts->smack.mnt_opts[i], 0); if (IS_ERR(skp)) return PTR_ERR(skp); sp->smk_floor = skp; break; case FSHAT_MNT: - skp = smk_import_entry(opts->mnt_opts[i], 0); + skp = smk_import_entry(opts->smack.mnt_opts[i], 0); if (IS_ERR(skp)) return PTR_ERR(skp); sp->smk_hat = skp; break; case FSROOT_MNT: - skp = smk_import_entry(opts->mnt_opts[i], 0); + skp = smk_import_entry(opts->smack.mnt_opts[i], 0); if (IS_ERR(skp)) return PTR_ERR(skp); sp->smk_root = skp; break; case FSTRANS_MNT: - skp = smk_import_entry(opts->mnt_opts[i], 0); + skp = smk_import_entry(opts->smack.mnt_opts[i], 0); if (IS_ERR(skp)) return PTR_ERR(skp); sp->smk_root = skp;