From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DFE2C4332F for ; Mon, 11 Oct 2021 21:34:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B88D60238 for ; Mon, 11 Oct 2021 21:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235332AbhJKVgb (ORCPT ); Mon, 11 Oct 2021 17:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235315AbhJKVg3 (ORCPT ); Mon, 11 Oct 2021 17:36:29 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06DE7C06161C for ; Mon, 11 Oct 2021 14:34:28 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id d3so45334947edp.3 for ; Mon, 11 Oct 2021 14:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2ASvbaX4mULlaQ5VNPfAMnoxqnz/X2X3p0hluU+FIx0=; b=GiaUqRzMzNZdxYScPjPe67tmbRfAkynuVW7jg+j+0HBDVYAZ68l2sqeWVWgHuZrcBU k6U7oTLA4aSdUOyJNK92QwUQlGj8rxB0exbbQpz1TWi70ip96mgchR3g5BpCZXnQwRMz H+lXteD9kB9UeLgfxAE/A7DZMwh4T1CLoYvQ1dSezaMFim857pG5rcZ1bH+r0wmceFAs OEW87b2KDx+sdoXDzWliapO3EmyyxQbo1T2z2wDIuy0Gtu0fEuv8qmg2TBrLvCLBepJm H01rmaiD2lU2pNAU2sCoIHLBayWlWbtQcGUzWQSuIyTIxd1ZozWZMrw6e8DPm6ydlhsF fyGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2ASvbaX4mULlaQ5VNPfAMnoxqnz/X2X3p0hluU+FIx0=; b=NTnOlR7mA9J2XZuxYuXR+vvThe3N2l4CirFFph52Lfi6Z0bWOlha4kltG08g4OcsFk PU6efxpK9JnyaZyNu/OmL6gqoVd08/vN4H0H4YyK3QVyokNHt3FVtMNOj+aHjsT//Btb FclhNC78i8Js3x3wK6ZX0iZp5xEK8w372IC4+6QBKRmEDM2iVnhd7oHToTlGxDY7yiwF QQMz+NTbOUmImM9V6A6Ol51Nec+AYWAHjHHtIpwnMUHPkClGon/nM02F39pHijpq/dU4 Iqb8I0mvJP2de3ag+YJKgsaqbCLwN2dNGFFPdpdGfcUS1tDSKRTXaBhPyDAe0KHJm8ks Mzbg== X-Gm-Message-State: AOAM533CC6av7Ttb+NRjodZlGyEcfs2Cmx9/6Xigafu0tsZeCXhYOwwd fni3zkBXeC65Zm4xSZ6ktDLnVa3X346fzaYQyfJBNCkcVw== X-Google-Smtp-Source: ABdhPJyO3wD+tHrVQmXHAZ7sE5WYEdQl0aKMJ//KoLlskSOmk+AfJORoEj9x9vQTLaFdFxfB1vfKy3dWfszaiXIkUn8= X-Received: by 2002:a17:906:2f16:: with SMTP id v22mr27539784eji.126.1633988066527; Mon, 11 Oct 2021 14:34:26 -0700 (PDT) MIME-Version: 1.0 References: <20211007004629.1113572-1-tkjos@google.com> <20211007004629.1113572-4-tkjos@google.com> <6dd3cdff-c4eb-6457-f04c-199263acd80b@schaufler-ca.com> In-Reply-To: <6dd3cdff-c4eb-6457-f04c-199263acd80b@schaufler-ca.com> From: Paul Moore Date: Mon, 11 Oct 2021 17:34:15 -0400 Message-ID: Subject: Re: [PATCH v4 3/3] binder: use euid from cred instead of using task To: Casey Schaufler Cc: Todd Kjos , gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com, christian@brauner.io, James Morris , Serge Hallyn , Stephen Smalley , Eric Paris , keescook@chromium.org, jannh@google.com, Jeffrey Vander Stoep , zohar@linux.ibm.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, joel@joelfernandes.org, kernel-team@android.com, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 8, 2021 at 5:25 PM Casey Schaufler wrote: > > On 10/8/2021 2:12 PM, Paul Moore wrote: > > On Wed, Oct 6, 2021 at 8:46 PM Todd Kjos wrote: > >> Set a transaction's sender_euid from the 'struct cred' > >> saved at binder_open() instead of looking up the euid > >> from the binder proc's 'struct task'. This ensures > >> the euid is associated with the security context that > >> of the task that opened binder. > >> > >> Fixes: 457b9a6f09f0 ("Staging: android: add binder driver") > >> Signed-off-by: Todd Kjos > >> Suggested-by: Stephen Smalley > >> Cc: stable@vger.kernel.org # 4.4+ > >> --- > >> v3: added this patch to series > >> > >> drivers/android/binder.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > This is an interesting ordering of the patches. Unless I'm missing > > something I would have expected patch 3/3 to come first, followed by > > 2/3, with patch 1/3 at the end; basically the reverse of what was > > posted here. > > > > My reading of the previous thread was that Casey has made his peace > > with these changes > > Yes. I will address the stacking concerns more directly. > I am still somewhat baffled by the intent of the hook, the data > passed to it, and the SELinux policy enforcement decisions, but > that's beyond my scope. Okay, I just wanted to make sure there were no objections. -- paul moore www.paul-moore.com