Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp22330lfe; Fri, 15 Apr 2022 17:35:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxM8FMtrZAdK5ddychH8DDFy06wHYb2fXptoEWhsZc5QCpOPg3xyXZZImgUA0buqjUTnREY X-Received: by 2002:a63:1024:0:b0:39d:1172:b8e0 with SMTP id f36-20020a631024000000b0039d1172b8e0mr1128780pgl.423.1650069350599; Fri, 15 Apr 2022 17:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069350; cv=none; d=google.com; s=arc-20160816; b=kKKECdwZYT6uxDjCLClXv51zkSyp5iSp7MNGXthLEDwAZgXKfUv+GfVIWTViGdDemN jndjBdd+Jzj/1HuoUbcmVfoH9z27QDVMDndpPMP5SL5EHWwMFPkjmQQmZ90TbLQqTXfO 2ylOFnnMDrlRNxTMykIDNMLYnThG18bkRS/czi5NKWgBL7Tzhauhnb2463toNuuThEXo OJYROGg6ZXiPyeVjFax6ZMAFrZ/coWAr6RrkcKA82+cWBw0Y4f/DrKNWBSGjzSwmx8Ii /k1odBu/ueWYken6zp1zOlLR/EYO3w9mjU6kBWNKGOS1MOo35OB3jC1zU4ToAlRRw7Cp 9aGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=69UohOF3eRTLQZh2FjF33Zrm4UgU6zPehXD/dlT5I2I=; b=fOMrDbg71aBvfAwMdz9ckvtm2ssvhLebwEwxoNVutgvY7WTtNTcG83AuC5MvnaZFCW dNQ83Cy9/9vVjHeipUFR6/epv+sdWLjudg5bJuGdvVHzhR4H4NrYuKZNjWf9nOadd/3k 23i9eB6/dRSnjH/4TLrh92riYVo3/xHWyZVLqZH+0/vlBzmgk2kFIOi0+BdZluI87ofB uFGF4ngLxn921ntWTxMV9EPIKDQjEGH1z2ZYZk5hRZKzIuQI7zWaRWYMfcfc3xsIych2 vern0CzWgN/EEhnEhr3FgEGRVplWOXo1ir9ghyOaRKqqW19oVD8jVG9w1CoYdenkHlry Tozw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=dFH1T+R7; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z12-20020a056a00240c00b004fa3a8e0084si3096493pfh.315.2022.04.15.17.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:35:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=dFH1T+R7; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECA60EE4E5; Fri, 15 Apr 2022 17:31:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356088AbiDOVfo (ORCPT + 99 others); Fri, 15 Apr 2022 17:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355444AbiDOVfa (ORCPT ); Fri, 15 Apr 2022 17:35:30 -0400 Received: from sonic313-15.consmr.mail.ne1.yahoo.com (sonic313-15.consmr.mail.ne1.yahoo.com [66.163.185.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D0EDAC07A for ; Fri, 15 Apr 2022 14:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650058380; bh=69UohOF3eRTLQZh2FjF33Zrm4UgU6zPehXD/dlT5I2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=dFH1T+R7io9BnJ6wnYAdnrlx4GJ5f/JlODGd7gQwfdHtCGuG45umyM3Zvg9oUFyK5Ib2bhXru5B1Kv8FmjrxFbZZJflqPbvn47c+bhsCbjcsaRhEpgKPZOJkQm0QOo0DHwgRs3qLwsF+Jo9OOyQiX838ihqd7jL820Q4ZOtHGTRk/HbfUtmCMv+OGvsgV4p9nwhYsQJylgZa0wBZiEiyDe5iWXjpqbo2QfYTWSY36Q34vlzO8qoMAlzasgnVflhAsUd5WeeqdBndjYBZZGDKBvD8qyRD9zAvy0566RPHXUJ7W1ZJrSBLWLG9TvL90Y8rj5DaI+aw/sM53Dkpr4Ls2Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650058380; bh=F2aAwfYlp0Jc+hhPV8Os7LpIXKbbebqom/S3aDa2oz5=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=VILz5Yfr2bsr9iKPacBBcKe2xIKDDv1hqYNUv3l8WdTihZSDyeBL2Id0nJk77oY7gZuB7k2PXrm9cGHyuivflI3QklPFATZlxXPVO2w54aTgxvnP/QR4hO4dkWadCEJM4K4KGo4YSubDj/pzanjGlbU5F4XJN7DdxOHadwnEiPvFWcxbXu6MMgyVB4/jILFXYq0czd4YfiAPgUJk8M+aLDB0V+ouhz7qlNt9phUYelv4l44UzSqiRqZ6568V3F6coXkvvfqPhBD4JH2rgbbluZqiRE8JcJDlp2UAYsmB7UrPQHyBJrF1+DiNxsrBbtxtiIasOFNoRkCyiD6qXj+Lyw== X-YMail-OSG: m1kjiNYVM1kxbDnk_TUK.C7nnu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ppewRkEFhmFQujuT9IThviq2yzQPbLeOi1lfolgfB3IohFoQfzU1ewzzzVoH8vl55x.LMf1H LZYPYq2MDDBgHo.viG_qtPJ6cJPkMzG0DswBeXSMFsg7kfVzLW7Nfa9uB50ZLch61F6PO8NXE8Sy TOEo- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Fri, 15 Apr 2022 21:33:00 +0000 Received: by hermes--canary-production-ne1-c7c4f6977-hpxwv (VZM Hermes SMTP Server) with ESMTPA ID b492b8f8d9f0e2ffe991666b37d07d11; Fri, 15 Apr 2022 21:32:57 +0000 (UTC) From: Casey Schaufler To: casey.schaufler@intel.com, jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Cc: casey@schaufler-ca.com, linux-audit@redhat.com, keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com, stephen.smalley.work@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH v34 29/29] AppArmor: Remove the exclusive flag Date: Fri, 15 Apr 2022 14:18:01 -0700 Message-Id: <20220415211801.12667-30-casey@schaufler-ca.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220415211801.12667-1-casey@schaufler-ca.com> References: <20220415211801.12667-1-casey@schaufler-ca.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the inclusion of the interface LSM process attribute mechanism AppArmor no longer needs to be treated as an "exclusive" security module. Remove the flag that indicates it is exclusive. Remove the stub getpeersec_dgram AppArmor hook as it has no effect in the single LSM case and interferes in the multiple LSM case. Acked-by: Stephen Smalley Acked-by: John Johansen Reviewed-by: Kees Cook Signed-off-by: Casey Schaufler --- security/apparmor/lsm.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 1ee58c1491ab..388298a15556 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -1145,22 +1145,6 @@ static int apparmor_socket_getpeersec_stream(struct socket *sock, return error; } -/** - * apparmor_socket_getpeersec_dgram - get security label of packet - * @sock: the peer socket - * @skb: packet data - * @secid: pointer to where to put the secid of the packet - * - * Sets the netlabel socket state on sk from parent - */ -static int apparmor_socket_getpeersec_dgram(struct socket *sock, - struct sk_buff *skb, u32 *secid) - -{ - /* TODO: requires secid support */ - return -ENOPROTOOPT; -} - /** * apparmor_sock_graft - Initialize newly created socket * @sk: child sock @@ -1264,8 +1248,6 @@ static struct security_hook_list apparmor_hooks[] __lsm_ro_after_init = { #endif LSM_HOOK_INIT(socket_getpeersec_stream, apparmor_socket_getpeersec_stream), - LSM_HOOK_INIT(socket_getpeersec_dgram, - apparmor_socket_getpeersec_dgram), LSM_HOOK_INIT(sock_graft, apparmor_sock_graft), #ifdef CONFIG_NETWORK_SECMARK LSM_HOOK_INIT(inet_conn_request, apparmor_inet_conn_request), @@ -1919,7 +1901,7 @@ static int __init apparmor_init(void) DEFINE_LSM(apparmor) = { .name = "apparmor", - .flags = LSM_FLAG_LEGACY_MAJOR | LSM_FLAG_EXCLUSIVE, + .flags = LSM_FLAG_LEGACY_MAJOR, .enabled = &apparmor_enabled, .blobs = &apparmor_blob_sizes, .init = apparmor_init, -- 2.35.1