From patchwork Tue Sep 29 10:57:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290928 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=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 1AF39C4741F for ; Tue, 29 Sep 2020 12:11:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1AF920759 for ; Tue, 29 Sep 2020 12:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601381481; bh=T6mR97KSK3mQAcRVINKVqt1yKOVBS7sfxQ4KrGiyM2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SempwAzaKnFy0khwYhaGWZx2xxjgCSbb7dqiLnuJb0Ojj6ilIO4D3omW4l1f+2tiF eNofgbB3/IH/g+J1r6Cyx3hHt+3YWeIXjWX4NmywzzWw5tgrhK/2ZfMlWZgmQxYenm Sw0sxwZ4NZVrXHXmIARqjn7yJMFbur/cw9dMQClM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731133AbgI2MLP (ORCPT ); Tue, 29 Sep 2020 08:11:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:53440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730173AbgI2Lhe (ORCPT ); Tue, 29 Sep 2020 07:37:34 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89C9A23BCE; Tue, 29 Sep 2020 11:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379330; bh=T6mR97KSK3mQAcRVINKVqt1yKOVBS7sfxQ4KrGiyM2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pQpm9oFyWQo7vEEqhhHbG7UA/0CI/yuDyhUflkO2347EkWTW+hqCb+xDVAK/jhxTy f3euAOxSL2mFWGxfP6XwVpb93ULDdheXnDw03zkTtlrsttQzNi+xOY9THmhuFnJRTD bUBBXg04khuDOZUNgR1P/ZdVhQhBzMb++LnCB8QE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve Grubb , Paul Moore , Sasha Levin Subject: [PATCH 5.4 114/388] audit: CONFIG_CHANGE dont log internal bookkeeping as an event Date: Tue, 29 Sep 2020 12:57:25 +0200 Message-Id: <20200929110015.994243454@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Steve Grubb [ Upstream commit 70b3eeed49e8190d97139806f6fbaf8964306cdb ] Common Criteria calls out for any action that modifies the audit trail to be recorded. That usually is interpreted to mean insertion or removal of rules. It is not required to log modification of the inode information since the watch is still in effect. Additionally, if the rule is a never rule and the underlying file is one they do not want events for, they get an event for this bookkeeping update against their wishes. Since no device/inode info is logged at insertion and no device/inode information is logged on update, there is nothing meaningful being communicated to the admin by the CONFIG_CHANGE updated_rules event. One can assume that the rule was not "modified" because it is still watching the intended target. If the device or inode cannot be resolved, then audit_panic is called which is sufficient. The correct resolution is to drop logging config_update events since the watch is still in effect but just on another unknown inode. Signed-off-by: Steve Grubb Signed-off-by: Paul Moore Signed-off-by: Sasha Levin --- kernel/audit_watch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 4508d5e0cf696..8a8fd732ff6d0 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c @@ -302,8 +302,6 @@ static void audit_update_watch(struct audit_parent *parent, if (oentry->rule.exe) audit_remove_mark(oentry->rule.exe); - audit_watch_log_rule_change(r, owatch, "updated_rules"); - call_rcu(&oentry->rcu, audit_free_rule_rcu); }