Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3225206pxb; Mon, 18 Apr 2022 19:47:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzeXXlytIi1l/dQrLGeYctdgWsXVXj8vD+7TJFrTKxRdBUd1GMM11Rl9lDQBPpHlvrOgyK X-Received: by 2002:a05:6402:2693:b0:423:e808:4be6 with SMTP id w19-20020a056402269300b00423e8084be6mr7231367edd.358.1650336449664; Mon, 18 Apr 2022 19:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650336449; cv=none; d=google.com; s=arc-20160816; b=MTmRdI7vdeCfXDF/h1JFzLg4MbMDqsS2e2xa//vBhj8sD65qMPRL012jkr+WJz5+a/ fD63zzGJZg3DyWYcKztbHQNMU1coMPxtXUpkRb1lQ+1Xbz3gJoB/ugf7CW2LFmWz3afM gBpZCvBRuNHqxOfZBz/v3HVFOLlcquKjePxBwgYiDQn6VCn05dyEE4YwO5iqj5E1KjVr +NzSG9BbHa86ubK66kIq9gg0pA3pcQPobEgOlezlQ9MxrMBe0FkqkPuLyzUbZQdHugRX zIHz5/kMYgjSJgkF4akIQRTq8wQ+psMqKKliWYBMcqcMwXKZw2VNqTZAAFep3FrRLucB Vv3Q== 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=M4B7x3gXMUeW50C0finqRPZlOCUQn3mIYLBp/F9EtRZ3cdgECQQ1ltW4WeGHb2wnV+ JlhYvYL2+CVlwhmwjzisoSKsWcI1dLDxFKtc5OctCdXPZMfoRicLqX7LkBPM46Kc61Cn WD1ZdvUslD0KO1pRrn61Yq+YtNiPpWFGMNVGwhkcX+Y93rqcBSNKhbzFyFeRiycMPXid lEm27F13zx++gt6+YOnCFyeMwiF4bH6dJI6PeP1nku7xrSMLknM7qctIPDHDcyNHRPWh xHI1O+CkUslg1vb5Xb/C8cs0MjC4u3bZr8pOGoRqllyD6xpi3WvZdRRb0m6x1KRQx3Gc ThMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=oPVbAjSl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a056402279300b00423f2d954fcsi2657036ede.49.2022.04.18.19.47.06; Mon, 18 Apr 2022 19:47:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=oPVbAjSl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236716AbiDRPsI (ORCPT + 99 others); Mon, 18 Apr 2022 11:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345509AbiDRPrO (ORCPT ); Mon, 18 Apr 2022 11:47:14 -0400 Received: from sonic311-30.consmr.mail.ne1.yahoo.com (sonic311-30.consmr.mail.ne1.yahoo.com [66.163.188.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 324FF5BE45 for ; Mon, 18 Apr 2022 08:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650294873; bh=69UohOF3eRTLQZh2FjF33Zrm4UgU6zPehXD/dlT5I2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=oPVbAjSlM89WvAYoyW62RqgjWWq9lBP3EPNHrTTYNreUeen7rPmgI+LfWY3fYutUqoGiyBvow9EzgyFStP/GJMt3ODF+rPbYK516PILPVvDv3kKkLHc2FCizVKY9DIeYnAvzC7tGBQx/15i/K2ZDihonyJYQHf7ynlPMTtAV0B19idYcI+0hjAkKlJcQ8nGzQuN8LmgsZhNZV8yE/YcGxfiEFwQikTW+6LOMEOvC9CouRJFMlDiPpSW9kHGEsURemIZp1eVNmot7n/R/9qGKRzmi20MXAtFuoBUkuhlO+qaCOpggJaSBjMC6PNq12lbW3fBdOrRWzVqmZEOOOoDy3g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1650294873; bh=nS8fn6QTXDQjCIFL+o4u3xtJmoD/VojRgAaADHs79/N=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Bncmwg8/E86xI+dhKQGx8TE1QoDA5TsT7JlDL/j5EeBkMENq9v5feXTGpZZvwzAWamQKnRcOmOBy0D2S3qrHc1nLLZ6yZ1VfBbAPpWwrd8ln/uxN/TCOmeeW033KXPImGdTcZx3ecu3DFtVIcR4gLo5xrGeudSla69NExcDxCI5QTx0QQMRAnAYH5ShIaRT68GhtxzOK1bw3IlzlC3MyAkT1hCne2gKBg15gV9oi3hOfrlNssZTNyRpxcH/H0wYYbcn+dPR/dvFULs37TUg8k3QeyDBiMbUqtJZtYxqy85lP+hgvMthOAyR6HtYLl5XMFPbnFOHSfL1xH+uuB622NA== X-YMail-OSG: QUP9NT8VM1kDlX2S3pPL7dScr7DG3GjZ6wegZmh610UDvje.9iESBMDAqFuJ4.f .hr8_548_RU.rtXup7vMN4SfiDHc5kIWFMkX5S3xEhZ2Sxbu5PyrfY5pxESQaHSkHdHna6ogWumK nK0UPC0yktGSpXh9mj.d6dTmi8MlHmVyxaYeOTSzhorVD6epBCgnAExPGFZ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 1Ag-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Mon, 18 Apr 2022 15:14:33 +0000 Received: by hermes--canary-production-bf1-5f49dbcd6-xjccz (VZM Hermes SMTP Server) with ESMTPA ID 311eab809775b4af02ae966c725fa26b; Mon, 18 Apr 2022 15:14:29 +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 v35 29/29] AppArmor: Remove the exclusive flag Date: Mon, 18 Apr 2022 07:59:45 -0700 Message-Id: <20220418145945.38797-30-casey@schaufler-ca.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220418145945.38797-1-casey@schaufler-ca.com> References: <20220418145945.38797-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,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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