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.7 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 C9B79C433DB for ; Wed, 24 Feb 2021 00:04: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 E640764E77 for ; Wed, 24 Feb 2021 00:04:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E640764E77 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-229-m38vVDj1OaOr_vIhYemcVw-1; Tue, 23 Feb 2021 19:04:21 -0500 X-MC-Unique: m38vVDj1OaOr_vIhYemcVw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CF441E562; Wed, 24 Feb 2021 00:04:17 +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 687EF2CFF4; Wed, 24 Feb 2021 00:04:15 +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 1C5BE18095CB; Wed, 24 Feb 2021 00:04:12 +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 11O049ub021938 for ; Tue, 23 Feb 2021 19:04:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id A8716F8963; Wed, 24 Feb 2021 00:04:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F668F8960 for ; Wed, 24 Feb 2021 00:04:06 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 D81F98CBAA4 for ; Wed, 24 Feb 2021 00:04:06 +0000 (UTC) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-rmQWgPcyPpaXZb0-SenI_g-1; Tue, 23 Feb 2021 19:04:04 -0500 X-MC-Unique: rmQWgPcyPpaXZb0-SenI_g-1 Received: by mail-ej1-f45.google.com with SMTP id k13so212227ejs.10 for ; Tue, 23 Feb 2021 16:04:04 -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=ujaSmRZsBwxy7ijiic2DjRlFM+Lo7XjiktoksGBmZgU=; b=QdxZYkb5IuuLSMMwyzCrjoY2Scrq9+ZnX7XJUHlIKyp9aGl0fANyqnVC/WtfpHA3rX VuRQfs/DPPXU+IVAHnxjzE7933Yr1vDcDl++w2fJ4N/rvZkEEBPVyKe1ovEWfqu75caZ lQx60BPkm2ViSrRX4qLuK6a67Gjj3Bj4kNFEB5bHOzCZ0Lxe1km5r5fHP+vKAoct5t1E xVQS4NO2dKeDfqu0wudDrEeOA3YBtD6BmOgGlARtGtpGhm/NgP08fjvcSYMdrBOvUq9u 0fPAKn1o12HL709THPjyel6QX3rvoM+1eGn3t2F1pPUCRYQuN+PpZTDRjTHkFnOTMGQQ 4GYw== X-Gm-Message-State: AOAM530sarautdXIdgfm4GOC8RriBIKatHkwtW57ZGjvdsKBAwlDPKK0 GPWWMr4p2rzD/bELG4+Um4K32mHHWytkInGlAQiD X-Google-Smtp-Source: ABdhPJw7wLn61yBHi1fjBNwK7jx6HvQKpbr/Lp7IKALGN+KVnBhrQW3vKurixFkk+NIXSNeZw2lwjYObNn8YYQZEqx4= X-Received: by 2002:a17:906:a443:: with SMTP id cb3mr13393865ejb.542.1614125043313; Tue, 23 Feb 2021 16:04:03 -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: From: Paul Moore Date: Tue, 23 Feb 2021 19:03:52 -0500 Message-ID: Subject: Re: [RFC PATCH 0/4] Split security_task_getsecid() into subj and obj variants To: Mimi Zohar 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 Cc: selinux@vger.kernel.org, linux-security-module@vger.kernel.org, John Johansen , 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.16 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 Tue, Feb 23, 2021 at 9:14 AM Mimi Zohar wrote: > On Mon, 2021-02-22 at 15:58 -0800, 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. > > Thanks, Casey, Paul. The IMA changes look fine. IMA policy rules are > normally written in terms of a file's LSM labels, the obj_type, so > hopefully this change has minimal, if any, impact. Thanks Mimi I appreciate the additional review. Would you mind sending your ACK for the IMA related patches in the patchset? -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit