Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3412189rwa; Tue, 23 Aug 2022 04:28:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR5zvAzwHh3Pr7NkGaHekwPLHQ2/IUvmENnW4bnQE11girsIRwtEDRXCfWSvxePkB5jzDKFd X-Received: by 2002:a05:6a00:1496:b0:52f:734f:9122 with SMTP id v22-20020a056a00149600b0052f734f9122mr24959102pfu.85.1661254103378; Tue, 23 Aug 2022 04:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254103; cv=none; d=google.com; s=arc-20160816; b=0gm3wBKis+xgby/52VXyi6+0LRCH8+86nlbjoolb08VDMTOww87ZoqBnkzxN9/w2pr INxljgXGL0AvVoMLY7bRy6mWG/8EKWL56jtx9i8QJObifivOulL5wU8MMpFVa8yHrJhH +G13SRPt0GLb3tVbPXXGsX9OyXR80Uf3Fb0F4JQkua0WJlyfrtKyriGXQAB/W7zURzwM aLIMyRhm+2A9+p7V1TrmBRoIn5eIL9DxuURYIueW3Jicu8K4UvLrP5kReuvKn3gbNhat LnLQ307GD7p6rPUoyLG+HoJdKxz72XtVF/OIg3kuFWjdIiWpwcihjakBrk2Kf1P62E2/ 48GA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KeLZKOMmbVLGQ/oeCxF8j3bKmpuX+GnrLV+yltxZrv4=; b=qcx2LTYmsgRhEbrSVyRFFiGLp8y8oKM2z3aLV6Bna78SObCi6hEOCrf7f60rgmCTbm oljOAp7yRqooUcuzqpMujELGVFqVyTD7RbR/rGYSL8SAcETHOvQONCkHkVjoGqUi3HM5 I5ajM4vhUJJV+x2KWKW8ly9eZRbaz6OAT7i/oCSwA+Utm1A6u+4Xcv1OVJGWp1MSvLJf p3sNh/V5M3SHeaT4T2P888omR2OW8XOK7D+FKKQzr2qQiiAAPYH29tmb2e+BNY02OYDc OFRWGbf/Br4fn9mRthHAaZOfrR4kT0QguEseeS+CVAvJ7h/dQnv0JGECCowj7ooaj21a /F8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eejVIGHQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a056a00234200b005184ae7a3c4si17516734pfj.140.2022.08.23.04.28.12; Tue, 23 Aug 2022 04:28:23 -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=@linuxfoundation.org header.s=korg header.b=eejVIGHQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353079AbiHWKOy (ORCPT + 99 others); Tue, 23 Aug 2022 06:14:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352529AbiHWKFv (ORCPT ); Tue, 23 Aug 2022 06:05:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9069F6B672; Tue, 23 Aug 2022 01:52:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2504E6150F; Tue, 23 Aug 2022 08:52:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 342ADC433D6; Tue, 23 Aug 2022 08:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244725; bh=o5kMqKGNeYaD1QjftcGevNh2DTWdrdudlXdleTnx8zM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eejVIGHQ3sBSZ7nONPs8Dfsd3ZCO9M9lBjgpj1fBjP/AcYUdfepBfKq92z2O1nH+h xBvCCHm+XpiuqPS+IsYoC/qFhsm1AL5npbE7gV2l/khvlJoVIntt5FZQpeosQvdz3X gQiRSPtyYO5dmMKt9OlQWA8MDmVwxUY7+/pzqvSc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Johansen Subject: [PATCH 4.14 181/229] apparmor: fix quiet_denied for file rules Date: Tue, 23 Aug 2022 10:25:42 +0200 Message-Id: <20220823080100.081326681@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: John Johansen commit 68ff8540cc9e4ab557065b3f635c1ff4c96e1f1c upstream. Global quieting of denied AppArmor generated file events is not handled correctly. Unfortunately the is checking if quieting of all audit events is set instead of just denied events. Fixes: 67012e8209df ("AppArmor: basic auditing infrastructure.") Signed-off-by: John Johansen Signed-off-by: Greg Kroah-Hartman --- security/apparmor/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/apparmor/audit.c +++ b/security/apparmor/audit.c @@ -143,7 +143,7 @@ int aa_audit(int type, struct aa_profile } if (AUDIT_MODE(profile) == AUDIT_QUIET || (type == AUDIT_APPARMOR_DENIED && - AUDIT_MODE(profile) == AUDIT_QUIET)) + AUDIT_MODE(profile) == AUDIT_QUIET_DENIED)) return aad(sa)->error; if (KILL_MODE(profile) && type == AUDIT_APPARMOR_DENIED)