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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 2D032C433E0 for ; Thu, 4 Mar 2021 00:47:24 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.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 87EF664E86 for ; Thu, 4 Mar 2021 00:47:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87EF664E86 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.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-57-IKQcqepDN0O5MuLziG7r7Q-1; Wed, 03 Mar 2021 19:47:20 -0500 X-MC-Unique: IKQcqepDN0O5MuLziG7r7Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9A765801980; Thu, 4 Mar 2021 00:47:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01BD1226EE; Thu, 4 Mar 2021 00:47:16 +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 A14EA18095CB; Thu, 4 Mar 2021 00:47:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1240lDcn013008 for ; Wed, 3 Mar 2021 19:47:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2232C202A438; Thu, 4 Mar 2021 00:47:13 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C0EF202A439 for ; Thu, 4 Mar 2021 00:47:10 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 E9645A3A9A2 for ; Thu, 4 Mar 2021 00:47:09 +0000 (UTC) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-jN20CSrjNGijDD-tHHYAWA-1; Wed, 03 Mar 2021 19:47:07 -0500 X-MC-Unique: jN20CSrjNGijDD-tHHYAWA-1 Received: by mail-ej1-f41.google.com with SMTP id r17so45934603ejy.13 for ; Wed, 03 Mar 2021 16:47:07 -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=mq1f8KTtZiYItxqJI2LgJatX0epQhRAFbaIZi+expz0=; b=AQqLGuUX5oc5Og07alG641eLC5aowR0Uxv+E+/bdlTQYK4yg4C0KNBLZxxOEfGNx1E tjzHXzrnmpXZydSb+0WqkyKTt5iXkv5nw3RHLbcjhNkWx+O3A5eF5bvTSqA/dQs5yFnH bEbqyP7+fy4gKieTU4n5YfTXTxAEaqLtYnfgKNvurKZWJjw2Z1/i19jb5YVWX/W4dILm kjFJpjAINFtxEkT+rNmTFUblRLfbVyJ/RR3vPcqTAzoGei1gj6pP25se88z/IPpMlPGe bJ3XO/3GTEfqq7uhKdv4M4b8y1IjGvkU7Nt8MI8z2vUZd3mhOJkeXRYY7h9nxyE/fTIB wdQg== X-Gm-Message-State: AOAM533YX+RHmneZLDs6FMC/Oc441agKHoLziSr+RbalR0isYEXQhlZL rXuyAUEdfOGDNELO0cXtG12mXwlQE1jUoT+hzPVm X-Google-Smtp-Source: ABdhPJzFReVQqWcB51YCLgOXcJ77lmnHR8e1TAPj9TL5+P31gZuqxQKpNr0xnGinbrwwT44eCfFHsDbq+b0OdR4h3Fw= X-Received: by 2002:a17:906:e116:: with SMTP id gj22mr1386315ejb.398.1614818826560; Wed, 03 Mar 2021 16:47:06 -0800 (PST) MIME-Version: 1.0 References: <161377712068.87807.12246856567527156637.stgit@sifl> <9ea5259b-fd84-e176-c042-c52a1c4fcc27@schaufler-ca.com> <1ab6d635-53af-6dd9-fc29-482723c80c6a@schaufler-ca.com> In-Reply-To: <1ab6d635-53af-6dd9-fc29-482723c80c6a@schaufler-ca.com> From: Paul Moore Date: Wed, 3 Mar 2021 19:46:55 -0500 Message-ID: Subject: Re: [RFC PATCH 0/4] Split security_task_getsecid() into subj and obj variants To: Casey Schaufler 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.78 on 10.11.54.4 X-loop: linux-audit@redhat.com Cc: selinux@vger.kernel.org, linux-security-module@vger.kernel.org, John Johansen , Mimi Zohar , 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.13 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 Mon, Feb 22, 2021 at 6:59 PM Casey Schaufler wrote: > On 2/20/2021 6:41 AM, Paul Moore wrote: > > On Fri, Feb 19, 2021 at 8:49 PM Casey Schaufler wrote: > >> On 2/19/2021 3:28 PM, Paul Moore wrote: > >>> As discussed briefly on the list (lore link below), we are a little > >>> sloppy when it comes to using task credentials, mixing both the > >>> subjective and object credentials. This patch set attempts to fix > >>> this by replacing security_task_getsecid() with two new hooks that > >>> return either the subjective (_subj) or objective (_obj) credentials. > >>> > >>> https://lore.kernel.org/linux-security-module/806848326.0ifERbkFSE@x2/T/ > >>> > >>> Casey and John, I made a quick pass through the Smack and AppArmor > >>> code in an effort to try and do the right thing, but I will admit > >>> that I haven't tested those changes, just the SELinux code. I > >>> would really appreciate your help in reviewing those changes. If > >>> you find it easier, feel free to wholesale replace my Smack/AppArmor > >>> patch with one of your own. > >> A quick test pass didn't show up anything obviously > >> amiss with the Smack changes. I have will do some more > >> through inspection, but they look fine so far. > > Thanks for testing it out and giving it a look. Beyond the Smack > > specific changes, I'm also interested in making sure all the hook > > callers are correct; I believe I made the correct substitutions, but a > > second (or third (or fourth ...)) set of eyes is never a bad idea. > > I'm still not seeing anything that looks wrong. I'd suggest that Mimi > have a look at the IMA bits. Assuming you are still good with these changes Casey, any chance I can get an ACK on the LSM and Smack patches? -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit