From patchwork Mon Jul 10 07:57:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9832845 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 41B9460363 for ; Mon, 10 Jul 2017 12:23:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3370B2624A for ; Mon, 10 Jul 2017 12:23:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25C8E26E4A; Mon, 10 Jul 2017 12:23:46 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from emsm-gh1-uea11.nsa.gov (emsm-gh1-uea11.nsa.gov [8.44.101.9]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17BFA2624A for ; Mon, 10 Jul 2017 12:23:45 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.40,340,1496102400"; d="scan'208";a="7430964" IronPort-PHdr: =?us-ascii?q?9a23=3ACQr53RDYsVepDEydZYV+UyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPr6rsywAkXT6L1XgUPTWs2DsrQf2rqQ6f6rBDRIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSijewZbB/IA+ooQjQucUbgZduIbstxxXUpXdFZ/?= =?us-ascii?q?5Yzn5yK1K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VCRF3foa5iEV+0LaCKILc9riiYE?= =?us-ascii?q?WqS5S489yRGusxf3yrRmLurQ/y0Xq4jj2cN75+LNiB4y8iZ0AN6F02GXSGF0nH?= =?us-ascii?q?0HSCMq3Kxlpkx90FiD27Big/NEDdxT++9JUgAiOJHB0+N6DtfyWgTdftuUU1um?= =?us-ascii?q?XMupASswTtMwxN8OZVxxG9O8gRDfxyCqGaMal6SXBJwo9aLRx2X+J9pnxHbcz6?= =?us-ascii?q?Quk14mQs5TOmK8na5/6xLfB4jXnEWFj6yqb7gT3DbR9GefymqDpEFZUQ93UaXD?= =?us-ascii?q?Rn0fY0/Woc345kPEVbOuD64oMhFCyc6DNKtFdMfljVNYS/f/IN7eeX6+m3+sBR?= =?us-ascii?q?aUwbOBdJTle30H0yXHCUgEiBse/W6cOggkByehuHreDDh0Gl3zfUzg6+5+qGm0?= =?us-ascii?q?TkUs1QGFc1Vh16ap+h4SnfGcRekT0agCuCg9qjV0B02w39fOC9qBvgZhZ6tdYc?= =?us-ascii?q?gn7FdAz2LZuBR3Poa8IKB6ml4ebwN3slvt1xptCYVAltUqoWgpzAVoKqKY105B?= =?us-ascii?q?eymf3ZDqNb3dMnPy8wy3a67KxlHe186b9b0S5/QiqlXsohupG1E4/Hp71tlZyX?= =?us-ascii?q?yc5o/FDAAKS5L+Tl439wRmp7HdeiQ9/Z7b2mB3PKm7tz/D1MglBO07xRa8Z91f?= =?us-ascii?q?Kr+LFBfuE80GAMijMPcqm1azbhIDJ+BS6LU5P9igd/uB1q+rOfxvnDS8gWRB/o?= =?us-ascii?q?99zlqG9zBgRe7Qw5YF3/aY0xOJVjjmiFehrt74mZpfZTwJAGqw1zLkC5VMZq13?= =?us-ascii?q?Z4oLDn2uI8KvzNVkm5HtQ2JY9EKkB14exM+mZAedb13n0g1UzkkYvXunmS6kwD?= =?us-ascii?q?NuiDEpsrCT3CrQzOT+bBAHIHJERHF+jVfwJoi5l9YaXEmsbwgtihSl/l33yLJF?= =?us-ascii?q?q6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Wf7hAmmmVEx6kHKUCyXm25CSJO2RlngvB?= =?us-ascii?q?0xfrQWO09lP2qzF3QTfUxdf5jkVVTqW3BVtVXyexP094tCiCPAvutNryo6g17U?= =?us-ascii?q?c2MmL+tN2Xj2uhJKlXH9DjK9yAPCk0vkwYgIc2Rty11oARAcC9L8sJ8HFicvve?= =?us-ascii?q?7HumkylAo6hbgIre5tua+u7NEXmhiK2arK6NxCtDx3g9slw+5cqsNvbU592FW/?= =?us-ascii?q?6ozXoeTz9juwvdWB64sqDUoEoQOUOVy0fLhIwLPtZC0Hkjyk7m5fYsQNQv9AVf?= =?us-ascii?q?DInMffUCqi7vODHs21aQf8o3VjWC0ztQBl/1FUJ4GK081W/rssLGi2rf+1oyRo?= =?us-ascii?q?Zqb0znnxt3D4cmJk0x9Fgb2C0DERICaRqDFrGnGVzlLZcYVUgEcRmH3rm6eqIs?= =?us-ascii?q?0E123Lyu5PHcbfZ9B6oLOfZRlAiOk0ZHGpgOq60RXKp8e0NB9K7QvgXiConmUO?= =?us-ascii?q?L8mnUsLvC1Wd5V8dwHuHQ++Aq/QACg6Zhb5bYBlJ+IbrJEYYTLvM1k9Ehn5CUP?= =?us-ascii?q?dyJXjxh9jhO5Tfgcq/r+4tjfq5en9uGuW7szSOoN6hg0HWN+j4Hqj1w5ptHXze?= =?us-ascii?q?hcQJXPiYvj6ABNP2KKuIHC3hlkM+UON56kfLZu9nUAPSgeJGsCPcGIZPk44i9t?= =?us-ascii?q?NijT5lNZD8MUf9wYINbCmQBai03uQrFT9dDXGlyGBIdpccAn8W73xCoy8ZsmXe?= =?us-ascii?q?bq8CW2KozH71FRI/NDiz1hlM7YpOcLxfrdEi4X7meCZhdowyOCxJiNC+rq8uWX?= =?us-ascii?q?0t7UTU4GEjQwU4hDODqI4RanSfatlJX1TgOU7df+gJ0ke0KKWHOxgKQFv71IEe?= =?us-ascii?q?5BliX0wDheGZroh/KOqdas7nVYtkFfGoZp8RLFALlfPol8ORngmcmkWE58Bjf4?= =?us-ascii?q?eMHTcRYuo/SZxuMN4+V4Kkv/apQWIhYaxLLg6XtaVBFiSLjosVaFRegRfsdpSO?= =?us-ascii?q?vYrnBJ7oJtM7MAPFqHq5P2tTpHtFc2AAstaL8xsDNabFXOkxNJVKb0orIAjREc?= =?us-ascii?q?UdFhs09WBW2wIH4+5ybAValNiamRD/oV8imcTqMQSEhoNyJ+TAmz2JpwZ7uok/?= =?us-ascii?q?dHsnlFniNmuvQq1SJpRAeksy32u60NwS4g+K2/tDgZtnxKUv6ekzzRBVtew/oE?= =?us-ascii?q?i6YcC3D/6V2ze3QDY47y76NhJcv+74Uh5G4/YRo7dS0cQeugEz3wj7+PAoGXst?= =?us-ascii?q?Jcgx6NuMPUYbCvLSgSMqk9xg/iRnh81AjehxVo8GoQTzW+7d8kOp+yOcI4ySqp?= =?us-ascii?q?A2TbckgD4r9RusvrqVELVPc2aU9mwGh708iHWDcCRMrUFmYxkwgrdGREcJVY6R?= =?us-ascii?q?MAEKkomDmItLFc/g4IeDfUDpil+o7IkMfKx3Y9Q9lqxmbNq6yLnJwq1mNqm89u?= =?us-ascii?q?4i6IpnsSa/TSU9VwDXjryodf1ev+au2isuADT4tnxqquUPsGMsS44mu235NqWk?= =?us-ascii?q?65ybgEGVq2LvMDzK/BUyi5UW2YRfiLc2+UkjY7Mk7z5QGoLlozaMdLs08yLPDP?= =?us-ascii?q?hptdlw39S7N7WD+cpVjBzGwsKekabR45uJ+7ewwWS+4cf/ScJekrwPAlFFsMbm?= =?us-ascii?q?PGHShoBO+yq1KtmpZ0O2l460Xgfevt6hzmMMeVGhQcFI7ar51x+f+9Rm+aO39v?= =?us-ascii?q?1h5yPE5y9+jBEVQ9rOlcfIiNndLIndR0zfYFd+txMS06otMcgZxs6Y+I0MqRah?= =?us-ascii?q?HRypHyJc3JoviGHfLQ0l4memZAUroWeQn1/Zk1PsYlW73PGrtUpQwcBa8+QJM7?= =?us-ascii?q?LWfw+qZ0LAd9cgPKYbS0hc7qpvmVaZRIv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Qm5D8/0LU4VLf6pg05XeJK?= =?us-ascii?q?ZFmKVh5zlhuiFv9nzEV14=3D?= X-IPAS-Result: =?us-ascii?q?A2EqAwAzcWNZ/wHyM5BdHAEBBAEBCgEBFwEBBAEBCgEBgy+?= =?us-ascii?q?BeI58oiiGXSiJIFcBAQEBAQEBAQIBAmgogjMkAQ1GWAEBAQEBASMCDV4DAwECJ?= =?us-ascii?q?BkBASoKAwECAwkBARcnCggDATABBQEcBhMFiiqeFz+LH4JXOiQCgmEBAQWIMQE?= =?us-ascii?q?pCBKDFoEyghqPY5FdjUaUDIsTKIZlSJMwM4EVWIEKMSEIKAiFTQ8cggdWiGYBA?= =?us-ascii?q?QE?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 10 Jul 2017 12:23:44 +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 v6ACNg9B019736; Mon, 10 Jul 2017 08:23:42 -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 v6A7vi6b291322 for ; Mon, 10 Jul 2017 03:57:44 -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 v6A7vipw011214 for ; Mon, 10 Jul 2017 03:57:44 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1CBAABGMmNZf7PAVdFdHQEFAQsBhVKOC?= =?us-ascii?q?XOiKIRTghGGHAKDUD8YAQIBAQEBAQEBEwEBCQsLCCaFSgMDJxkBASoKAwEPPxI?= =?us-ascii?q?0AQUBHAYTii+eGD+LH4JXOoMHAQEFiC8BAQEBAQEBAwIBHQgJAQiDFoEyghqPY?= =?us-ascii?q?5FdjUaUDIsThw1IkzAzgRUfgUIxIQgoCIVNDxyCB1aIZgEBAQ?= X-IPAS-Result: =?us-ascii?q?A1CBAABGMmNZf7PAVdFdHQEFAQsBhVKOCXOiKIRTghGGHAK?= =?us-ascii?q?DUD8YAQIBAQEBAQEBEwEBCQsLCCaFSgMDJxkBASoKAwEPPxI0AQUBHAYTii+eG?= =?us-ascii?q?D+LH4JXOoMHAQEFiC8BAQEBAQEBAwIBHQgJAQiDFoEyghqPY5FdjUaUDIsThw1?= =?us-ascii?q?IkzAzgRUfgUIxIQgoCIVNDxyCB1aIZgEBAQ?= X-IronPort-AV: E=Sophos;i="5.40,339,1496116800"; d="scan'208";a="14714" Received: from emsm-gh1-uea10.corp.nsa.gov (HELO emsm-gh1-uea10.nsa.gov) ([10.208.41.36]) by goalie.tycho.ncsc.mil with ESMTP; 10 Jul 2017 03:57:43 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3A1hBWIxCP9DZm1E3XO2eoUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPT7p8bcNUDSrc9gkEXOFd2CrakV26yM7uuwBiQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9GiTe5Yr5+Ngu6oAXeusQVg4ZpN7o8xAbOrnZUYe?= =?us-ascii?q?pd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbY?= =?us-ascii?q?VguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLzhS?= =?us-ascii?q?wZKzA27n3Yis1ojKJavh2hoQB/w5XJa42RLfZyY7/Rcc8fSWdHQ81fVTFOApmk?= =?us-ascii?q?YoUPEeQPIOhWoYr6qVQMoxuzHhWgCP/1xzNUnHL6wbE23uI8Gg/GxgwgGNcOvW?= =?us-ascii?q?zRotrrKqgSSv2+wbfPzTXEbPNdxDDw6IvWfR8/uvGDQbVwcc3SyUQ0CwzFjk+Q?= =?us-ascii?q?qYvgPzOUy+QNtnKX7+16VeKgkmMqrRx6rDu3xso0lIXFmoYYxkrH+Ch52oo5ON?= =?us-ascii?q?m1RFBhbdK5EpZdszmWO5Z0T84sWW1kpSc3x7IctZKmYSQG1o4rywPRZvGJdYWD?= =?us-ascii?q?/wjtW/yLIThigXJoYLK/iAi28Uin0uD8U9O70FdOriZcitnMuGwB2wXd6sSaSP?= =?us-ascii?q?Zw+l2t2TmI1wDU5eFEJV47mbDHJJ4mx748jpsTsULdES/qgEj6krOae0E+9uWr?= =?us-ascii?q?6+nreKjqq5uCO4Nulw3zMKAjltS6AesiMwgOW2ab+f671L3m5UD5Q6tFgeMtkq?= =?us-ascii?q?bFt5DaIscbq7WlDA9VyIYj7BO/Dza70NQdh3UHK0hFeB2fg4jzJ17OOOz4Deu4?= =?us-ascii?q?g1m0izdk2fTGPrznApXQIXnOi6vhfLZh5E5czwo/19Zf54lOBb0bL/LzXVHx55?= =?us-ascii?q?TkCUodMgqp2K7bD89j34cSQirbHqiDLqrWvUSg4uMpPvnJaogIvjr0N/ki4bjp?= =?us-ascii?q?l3BvynEHeqz8/pYacziTGfNlaxGabHf3idAGEk8BvhA5Se33jRuFSzEFNCX6ZL?= =?us-ascii?q?41+jxuUNHuNozEXI34xeXZhCo=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0FmAQC9MmNZf7PAVdFdHQEFAQsBGAEFA?= =?us-ascii?q?QsBhSeOfKIohmSGHAKDUVcBAQEBAQEBAQIBAhABAQkLCwgmMYIzJAENRlgBAQE?= =?us-ascii?q?BAQEjAg1eAwMnGQEBKgoDAQ8/EjQBBQEcBhOKL54bP4sfglc6gwcBAQWILwEBA?= =?us-ascii?q?QEBAQEDAgEdCAkBCIMWgTKCGoxFDIMSkV2NRpQMixOHDUiTMDOBFYFiMSEIKAi?= =?us-ascii?q?FTQ8cggdWiGYBAQE?= X-IPAS-Result: =?us-ascii?q?A0FmAQC9MmNZf7PAVdFdHQEFAQsBGAEFAQsBhSeOfKIohmS?= =?us-ascii?q?GHAKDUVcBAQEBAQEBAQIBAhABAQkLCwgmMYIzJAENRlgBAQEBAQEjAg1eAwMnG?= =?us-ascii?q?QEBKgoDAQ8/EjQBBQEcBhOKL54bP4sfglc6gwcBAQWILwEBAQEBAQEDAgEdCAk?= =?us-ascii?q?BCIMWgTKCGoxFDIMSkV2NRpQMixOHDUiTMDOBFYFiMSEIKAiFTQ8cggdWiGYBA?= =?us-ascii?q?QE?= X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from mail-pf0-f179.google.com ([209.85.192.179]) by emsm-gh1-uea10.nsa.gov with ESMTP/TLS/AES128-GCM-SHA256; 10 Jul 2017 07:57:42 +0000 Received: by mail-pf0-f179.google.com with SMTP id e7so45977948pfk.0 for ; Mon, 10 Jul 2017 00:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6ZH1HQ6WT81G5qxK5uh+XDzniZpEGHbBE+ouSTYPZQ8=; b=oXU4qlkOlEHJr5KDxeysIFc5bYKs9Rgd8kwEsoEosn3xObx0QwKk01isx1+mECH3zO nDDbXpx28UpQ/NaKkitbV75lzV5APIok0rbKJDkwbOy0v0/9TU3DXWGtFak1ucsnaZJl NmjBB2w0OP956XgygT9weW7OatVFztDfBeg8Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6ZH1HQ6WT81G5qxK5uh+XDzniZpEGHbBE+ouSTYPZQ8=; b=QidYT4FwWrtDPBQau8QwWhiroJkpYZy+mUr3aMvpiaC1a/w9nvNW/eRZuTOMHG96C6 IBbqYY8nuHnBM4PVghCSS3FbpMVDYc0aLWPlBGqQRPqW99fqAuBYshQ4IjrUtWueSU0J HVrQNoQRkjznlf/ebCjWIxtIWS2GyZjCfU+FAC3yaGJbJIS1u3ILDlpHqd2UwLmwxnwJ GgK0GtVoumsgs0N7KM/myuzO6zmjfcbqr1vxI+QHOAGFfEYeoHnELlxOs7EKDQtgHkNz fELWTDvE2f/qYgaWtn6irSqp7bcxG5jG2JxxJ2pnWDzaWDJdHpMcG6BrZWkYhfiOJvRB O4sA== X-Gm-Message-State: AIVw111zcLx5gYuO7cch/J7xfCdsMPjYkngt6jOz584dKRytzhxurrWK 6CtH4f0lfjZizJ2f X-Received: by 10.98.44.205 with SMTP id s196mr28941288pfs.168.1499673461951; Mon, 10 Jul 2017 00:57:41 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id r9sm25932331pfi.114.2017.07.10.00.57.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 00:57:37 -0700 (PDT) From: Kees Cook To: Linus Torvalds Subject: [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier Date: Mon, 10 Jul 2017 00:57:25 -0700 Message-Id: <1499673451-66160-3-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499673451-66160-1-git-send-email-keescook@chromium.org> References: <1499673451-66160-1-git-send-email-keescook@chromium.org> X-Mailman-Approved-At: Mon, 10 Jul 2017 08:20:01 -0400 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Cc: Nicolas Pitre , "Jason A. Donenfeld" , Andy Lutomirski , Tetsuo Handa , Michal Hocko , David Howells , selinux@tycho.nsa.gov, Ingo Molnar , Hugh Dickins , Greg Ungerer , Stephen Smalley , Vivek Goyal , Rik van Riel , Kees Cook , linux-fsdevel@vger.kernel.org, Alexander Viro , James Morris , =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , John Johansen , Ben Hutchings , Oleg Nesterov , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP There are several places where exec needs to know if a privilege-gain has happened. These should be using the results of security_bprm_secureexec() but it is getting (needlessly) called very late. Instead, move this earlier in the exec code, to the start of the point of no return in setup_new_exec(). Here, the new creds have already been calculated (and stored in bprm->cred), which is normally what security_bprm_secureexec() wants to examine. Since it's moved earlier, LSMs hooking bprm_secureexec() need to be adjusted to use the creds in bprm: $ git grep LSM_HOOK_INIT.*bprm_secureexec apparmor/lsm.c: LSM_HOOK_INIT(bprm_secureexec, apparmor_bprm_secureexec), commoncap.c: LSM_HOOK_INIT(bprm_secureexec, cap_bprm_secureexec), selinux/hooks.c: LSM_HOOK_INIT(bprm_secureexec, selinux_bprm_secureexec), smack/smack_lsm.c: LSM_HOOK_INIT(bprm_secureexec, smack_bprm_secureexec), AppArmor does not access creds in apparmor_bprm_secureexec. Capabilities needed to be adjusted to use bprm creds. SELinux needed to be adjusted to use bprm creds for the security structure. Smack needed to be adjusted to use bprm creds for the security structure. The result of the bprm_secureexec() hook is saved in a new bprm field "secureexec" so it can be queried later (just AT_SECURE currently). Signed-off-by: Kees Cook --- fs/binfmt_elf.c | 2 +- fs/binfmt_elf_fdpic.c | 2 +- fs/exec.c | 5 +++++ include/linux/binfmts.h | 3 ++- include/linux/lsm_hooks.h | 3 ++- security/commoncap.c | 4 +--- security/selinux/hooks.c | 2 +- security/smack/smack_lsm.c | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 5075fd5c62c8..7f6ec4dac13d 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -254,7 +254,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec, NEW_AUX_ENT(AT_EUID, from_kuid_munged(cred->user_ns, cred->euid)); NEW_AUX_ENT(AT_GID, from_kgid_munged(cred->user_ns, cred->gid)); NEW_AUX_ENT(AT_EGID, from_kgid_munged(cred->user_ns, cred->egid)); - NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm)); + NEW_AUX_ENT(AT_SECURE, bprm->secureexec); NEW_AUX_ENT(AT_RANDOM, (elf_addr_t)(unsigned long)u_rand_bytes); #ifdef ELF_HWCAP2 NEW_AUX_ENT(AT_HWCAP2, ELF_HWCAP2); diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index cf93a4fad012..5aa9199dfb13 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -650,7 +650,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm, NEW_AUX_ENT(AT_EUID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->euid)); NEW_AUX_ENT(AT_GID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->gid)); NEW_AUX_ENT(AT_EGID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->egid)); - NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm)); + NEW_AUX_ENT(AT_SECURE, bprm->secureexec); NEW_AUX_ENT(AT_EXECFN, bprm->exec); #ifdef ARCH_DLINFO diff --git a/fs/exec.c b/fs/exec.c index 7842ae661e34..b92e37fb53aa 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1337,6 +1337,11 @@ EXPORT_SYMBOL(would_dump); void setup_new_exec(struct linux_binprm * bprm) { + if (security_bprm_secureexec(bprm)) { + /* Record for AT_SECURE. */ + bprm->secureexec = 1; + } + arch_pick_mmap_layout(current->mm); current->sas_ss_sp = current->sas_ss_size = 0; diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 05488da3aee9..1afaa303cad0 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -27,9 +27,10 @@ struct linux_binprm { unsigned int cred_prepared:1,/* true if creds already prepared (multiple * preps happen for interpreters) */ - cap_effective:1;/* true if has elevated effective capabilities, + cap_effective:1,/* true if has elevated effective capabilities, * false if not; except for init which inherits * its parent's caps anyway */ + secureexec:1; /* true when gaining privileges */ #ifdef __alpha__ unsigned int taso:1; #endif diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 080f34e66017..d1bd24fb4a33 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h @@ -72,7 +72,8 @@ * Return a boolean value (0 or 1) indicating whether a "secure exec" * is required. The flag is passed in the auxiliary table * on the initial stack to the ELF interpreter to indicate whether libc - * should enable secure mode. + * should enable secure mode. Called before bprm_committing_creds(), + * so pending credentials are in @bprm->cred. * @bprm contains the linux_binprm structure. * * Security hooks for filesystem operations. diff --git a/security/commoncap.c b/security/commoncap.c index 7abebd782d5e..482d3aac2fc6 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -624,12 +624,10 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) * Determine whether a secure execution is required, return 1 if it is, and 0 * if it is not. * - * The credentials have been committed by this point, and so are no longer - * available through @bprm->cred. */ int cap_bprm_secureexec(struct linux_binprm *bprm) { - const struct cred *cred = current_cred(); + const struct cred *cred = bprm->cred; kuid_t root_uid = make_kuid(cred->user_ns, 0); if (!uid_eq(cred->uid, root_uid)) { diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 819fd6858b49..9381c8474cf4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2420,7 +2420,7 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm) static int selinux_bprm_secureexec(struct linux_binprm *bprm) { - const struct task_security_struct *tsec = current_security(); + const struct task_security_struct *tsec = bprm->cred->security; u32 sid, osid; int atsecure = 0; diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 658f5d8c7e76..13cf9e66d5fe 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -975,7 +975,7 @@ static void smack_bprm_committing_creds(struct linux_binprm *bprm) */ static int smack_bprm_secureexec(struct linux_binprm *bprm) { - struct task_smack *tsp = current_security(); + struct task_smack *tsp = bprm->cred->security; if (tsp->smk_task != tsp->smk_forked) return 1;