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=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 460BFC433B4 for ; Fri, 14 May 2021 19:24:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28F1D6145B for ; Fri, 14 May 2021 19:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233088AbhENT0E (ORCPT ); Fri, 14 May 2021 15:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233935AbhENTZw (ORCPT ); Fri, 14 May 2021 15:25:52 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34DFC06138B for ; Fri, 14 May 2021 12:24:40 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id gv8-20020a17090b11c8b029015d47d8ecbbso347866pjb.3 for ; Fri, 14 May 2021 12:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7zYWopn37Ev0Ztgo7qbckFoeWWV5RAzUDbw0Dfbjdlw=; b=CMZSonsnXKB5rfp654jW6UBkcZJpQvr4Hl3h/Sqp9c5xOeKlo+X+kqqWm3C/Otq38b Gby1KIQVxuvRvD6LivosEWOYnU+tAsjc0470WhZAINAdTPN3hksm4E8lMmzXHsMnhdIr dMg9q2OAFM5nEax3IUS56gN67MKdcrw2ETr6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7zYWopn37Ev0Ztgo7qbckFoeWWV5RAzUDbw0Dfbjdlw=; b=G+/WCNnuLHuWqwCQFyqwsQzKmlx7IgacCag6ShbbSj3PVhX+6nIfUB2PqqGUXeopxC 2Gh0fv3TjGgXPurklR4VFSj1p6LnGERn4AoClqcRaOxMwFMEoSNPAnUypTApRx4Bz/5h rLJ3+EL8R9hYkUMtfRXZJDcUnTLAVxD3Mv6FEmcTgqD33HPF2y7k3Rm86xEl0fuLmq87 9836V+ZPzkbRJoUSmKkIidTI/tV0mwl+T0VK2TV/RUJDN7lZf5TNBayup+GNz5FVJ3RT 0edaMmtg6i9BofQ3RlCsrKaODYhUenkTCHJOtk+GpT6RKUbTokPsI8jXCVukXalzjv0n 4x6g== X-Gm-Message-State: AOAM531Au7C7SbfJEDnrprvKQEJqhHKzcZRqr9LmibQyi2aVsg2HtdKn RkIYr+050RcBhplKVYUO5bL1Bw== X-Google-Smtp-Source: ABdhPJxHMA/6v53f/nn/W7fZz/vDZdmjMu55VCA8wxeCxUw6+Ip7YnJ5TAlxokdAusW4aKY8IvIw/Q== X-Received: by 2002:a17:90a:1c02:: with SMTP id s2mr20301156pjs.172.1621020280425; Fri, 14 May 2021 12:24:40 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n11sm4983512pff.96.2021.05.14.12.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 12:24:39 -0700 (PDT) Date: Fri, 14 May 2021 12:24:38 -0700 From: Kees Cook To: Casey Schaufler Cc: casey.schaufler@intel.com, jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-audit@redhat.com, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com, sds@tycho.nsa.gov, linux-kernel@vger.kernel.org, Chuck Lever , linux-nfs@vger.kernel.org Subject: Re: [PATCH v26 17/25] LSM: Use lsmcontext in security_inode_getsecctx Message-ID: <202105141224.942DE93@keescook> References: <20210513200807.15910-1-casey@schaufler-ca.com> <20210513200807.15910-18-casey@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210513200807.15910-18-casey@schaufler-ca.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 13, 2021 at 01:07:59PM -0700, Casey Schaufler wrote: > Change the security_inode_getsecctx() interface to fill > a lsmcontext structure instead of data and length pointers. > This provides the information about which LSM created the > context so that security_release_secctx() can use the > correct hook. > > Acked-by: Stephen Smalley > Acked-by: Paul Moore > Acked-by: Chuck Lever > Reviewed-by: John Johansen > Signed-off-by: Casey Schaufler Seem good to me. Reviewed-by: Kees Cook -- Kees Cook 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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 AA6DBC433ED for ; Fri, 14 May 2021 19:25:04 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34A156145D for ; Fri, 14 May 2021 19:25:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34A156145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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-166-rQ-653OwOdy-8RQMbtedLA-1; Fri, 14 May 2021 15:25:00 -0400 X-MC-Unique: rQ-653OwOdy-8RQMbtedLA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DAC298049D4; Fri, 14 May 2021 19:24:57 +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 BF29019D9B; Fri, 14 May 2021 19:24:57 +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 858E8180B463; Fri, 14 May 2021 19:24:57 +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 14EJOs6J007189 for ; Fri, 14 May 2021 15:24:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 67C091711B0; Fri, 14 May 2021 19:24:54 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6131B1711BA for ; Fri, 14 May 2021 19:24:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CCFD100DE78 for ; Fri, 14 May 2021 19:24:51 +0000 (UTC) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-594-J60nMCuHPuKpd0MhpgOjGw-1; Fri, 14 May 2021 15:24:41 -0400 X-MC-Unique: J60nMCuHPuKpd0MhpgOjGw-1 Received: by mail-pl1-f169.google.com with SMTP id h20so16625580plr.4 for ; Fri, 14 May 2021 12:24:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7zYWopn37Ev0Ztgo7qbckFoeWWV5RAzUDbw0Dfbjdlw=; b=GF+qu1NLrOxhxKhXjskngipefm2KuDgCLrJIWRfSWWAV2LUpRWuDr7w6s/bWyHHhx0 4OGGEem6bZYVJJOgpKN/KZLhxa/anWKTxYwI6GYzLhlbjl7339IcL4qnjl6JpXDPao/f Px9yfTHYbVT3V/l8TEk5+GqVnDaDmHXYTQvjIIL52rg5tyyUC+9KMWA8XMxtnA+qKgag cMa8fZCL2AmkY9SlpKl59e8Y4kEaSMcZKF4e32pHbE4X1HyonIpqLT6B+nQptSPTkrwJ Tu/Jmr+tha6iMp12DlrDJyujirS2hPgzuZagB734TRPu3gOIMObQUsNqbGEimLIKGK0g H8AA== X-Gm-Message-State: AOAM531O92zEkigtuGHuCs7+6YlsY/7Jq3OvBy6pSasQQVTPhlvlloAX WpjtM3ZjLhOKMT9HI6maIT4NMA== X-Google-Smtp-Source: ABdhPJxHMA/6v53f/nn/W7fZz/vDZdmjMu55VCA8wxeCxUw6+Ip7YnJ5TAlxokdAusW4aKY8IvIw/Q== X-Received: by 2002:a17:90a:1c02:: with SMTP id s2mr20301156pjs.172.1621020280425; Fri, 14 May 2021 12:24:40 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n11sm4983512pff.96.2021.05.14.12.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 12:24:39 -0700 (PDT) Date: Fri, 14 May 2021 12:24:38 -0700 From: Kees Cook To: Casey Schaufler Subject: Re: [PATCH v26 17/25] LSM: Use lsmcontext in security_inode_getsecctx Message-ID: <202105141224.942DE93@keescook> References: <20210513200807.15910-1-casey@schaufler-ca.com> <20210513200807.15910-18-casey@schaufler-ca.com> MIME-Version: 1.0 In-Reply-To: <20210513200807.15910-18-casey@schaufler-ca.com> 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: linux-nfs@vger.kernel.org, john.johansen@canonical.com, selinux@vger.kernel.org, jmorris@namei.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-audit@redhat.com, casey.schaufler@intel.com, Chuck Lever , sds@tycho.nsa.gov 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.84 on 10.5.11.23 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-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, May 13, 2021 at 01:07:59PM -0700, Casey Schaufler wrote: > Change the security_inode_getsecctx() interface to fill > a lsmcontext structure instead of data and length pointers. > This provides the information about which LSM created the > context so that security_release_secctx() can use the > correct hook. > > Acked-by: Stephen Smalley > Acked-by: Paul Moore > Acked-by: Chuck Lever > Reviewed-by: John Johansen > Signed-off-by: Casey Schaufler Seem good to me. Reviewed-by: Kees Cook -- Kees Cook -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit