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 X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB29FC433E9 for ; Wed, 10 Mar 2021 14:41:46 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 414B464EC6 for ; Wed, 10 Mar 2021 14:41:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 414B464EC6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-574-RGcvQfFzMQ-AbOdBRKnbQg-1; Wed, 10 Mar 2021 09:41:43 -0500 X-MC-Unique: RGcvQfFzMQ-AbOdBRKnbQg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9B82196632D; Wed, 10 Mar 2021 14:41:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0F3862463; Wed, 10 Mar 2021 14:41:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8D5D057DC6; Wed, 10 Mar 2021 14:41:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12A8LTIi025517 for ; Wed, 10 Mar 2021 03:21:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id F30EEE56BB; Wed, 10 Mar 2021 08:21:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED8412D47E for ; Wed, 10 Mar 2021 08:21:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 161F81854CB2 for ; Wed, 10 Mar 2021 08:21:26 +0000 (UTC) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-eMY8qDuHOoarOJcXJUuCPg-1; Wed, 10 Mar 2021 03:21:23 -0500 X-MC-Unique: eMY8qDuHOoarOJcXJUuCPg-1 Received: by mail-lj1-f177.google.com with SMTP id q14so24446518ljp.4 for ; Wed, 10 Mar 2021 00:21:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DphxTuMCEpgHKRaen67zVxU/WlSz40n3RnzWZz5fZ/U=; b=jlsZ6DoGjFJOatytpb6nsMY2EVtj1N0k8wGSNu7xZsCWX21dv6deYzkD6w+Zj2FDJt E7C5WZc/cH4pNXHHZrnjcI6p3hGVutAN79RJYDfLdlyCb2Kbq4xEBMuaF19ssJbd6byi Kst/URRXXn0OMlhP8Np7y3V3G/Z+CS2tz8VOCh/UY3pmAY+OM6FT325taBMY7C+LktU3 2jw/3W4QEMisnY0ppbrFh1LLZ1ZGBz6bLYBjvNICe7cYPhZCXlfKt+df0epK/lRMqqAx WL3VFC5q420YXYsvOsi7EVuRlZH47xR0/wqinvDB3x3uA6yZNyUn1nKFYW39UdDJ/tQz m9DA== X-Gm-Message-State: AOAM532sIHFv3ZtSSxWWXtiv6gWdBcNwTUC0g1ghDP7YGYhD+HHpfbyD q4BpLZd5Fpu/VbWXy6PzV1xwoCafnoXhMpQU3wqAEA== X-Google-Smtp-Source: ABdhPJwhjLj6sQ6ZjEKwaRzEHOKoqu9UHbgNBLzLvQO/EGBmh1THPhSxBLGTtUEArL0AHLOR0qKXzBhP2SjgDDUl1Vw= X-Received: by 2002:a2e:7a11:: with SMTP id v17mr1156617ljc.403.1615364481490; Wed, 10 Mar 2021 00:21:21 -0800 (PST) MIME-Version: 1.0 References: <161377712068.87807.12246856567527156637.stgit@sifl> <161377734508.87807.8537642254664217815.stgit@sifl> In-Reply-To: From: Jeffrey Vander Stoep Date: Wed, 10 Mar 2021 09:21:10 +0100 Message-ID: Subject: Re: [RFC PATCH 1/4] lsm: separate security_task_getsecid() into subjective and objective variants To: Paul Moore X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Wed, 10 Mar 2021 09:41:22 -0500 Cc: John Johansen , SElinux list , James Morris , LSM List , linux-audit@redhat.com X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, Mar 5, 2021 at 12:44 AM Paul Moore wrote: > > On Thu, Mar 4, 2021 at 5:04 AM Jeffrey Vander Stoep wrote: > > On Sat, Feb 20, 2021 at 3:45 PM Paul Moore wrote: > > > On Fri, Feb 19, 2021 at 9:57 PM James Morris wrote: > > > > On Fri, 19 Feb 2021, Paul Moore wrote: > > > > > diff --git a/drivers/android/binder.c b/drivers/android/binder.c > > > > > index c119736ca56ac..39d501261108d 100644 > > > > > --- a/drivers/android/binder.c > > > > > +++ b/drivers/android/binder.c > > > > > @@ -2700,7 +2700,7 @@ static void binder_transaction(struct binder_proc *proc, > > > > > u32 secid; > > > > > size_t added_size; > > > > > > > > > > - security_task_getsecid(proc->tsk, &secid); > > > > > + security_task_getsecid_subj(proc->tsk, &secid); > > > > > ret = security_secid_to_secctx(secid, &secctx, &secctx_sz); > > > > > if (ret) { > > > > > return_error = BR_FAILED_REPLY; > > > > > > > > Can someone from the Android project confirm this is correct for binder? > > > > This looks correct to me. > > Thanks for the verification. Should I assume the SELinux specific > binder changes looked okay too? > Yes, those also look good to me. > https://lore.kernel.org/selinux/84053ed8-4778-f246-2177-cf5c1b9516a9@canonical.com/T/#m4ae49d4a5a62d600fa3f3b1a5bba2d6611b1051c > > -- > paul moore > www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit