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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A692DC433EF for ; Tue, 21 Dec 2021 20:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640119840; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+B5UjqrxyyfoIV/LTJF1pmi0B3UJpvZqbM6aLUBd07w=; b=W3g+n9YEYvrclpjELXds7TfDlLCw1RWpAhkJQTmrnk2hdG0T2V2GTn9KJ/nat+IdiVVFzc iG+4nAkaLz5zZlv6m98S3airnV7oLoyxvv8S8V8T2TVT/SoKcd9TBmZIcuHBdi2nJYsopQ kkYOnaYRYVcB1H5MIliB2E02p//g+JU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-83-qimDKYoQMR2cY0kw05GIXA-1; Tue, 21 Dec 2021 15:50:37 -0500 X-MC-Unique: qimDKYoQMR2cY0kw05GIXA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B3701006AA3; Tue, 21 Dec 2021 20:50:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F7A21037F5E; Tue, 21 Dec 2021 20:50:33 +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 9EFE84BB7B; Tue, 21 Dec 2021 20:50:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BLKoVlc008326 for ; Tue, 21 Dec 2021 15:50:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3AD347317F; Tue, 21 Dec 2021 20:50:31 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.2.14.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDE207316B; Tue, 21 Dec 2021 20:50:14 +0000 (UTC) Date: Tue, 21 Dec 2021 15:50:12 -0500 From: Richard Guy Briggs To: Paul Moore Subject: Re: [RFC PATCH v1] audit: log AUDIT_TIME_* records only from rules Message-ID: <20211221205012.GX1550715@madcap2.tricolour.ca> References: <20211104215313.GJ1550715@madcap2.tricolour.ca> <20211119180146.GM1550715@madcap2.tricolour.ca> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: linux-audit@redhat.com Cc: Eric Paris , Linux-Audit Mailing List 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.22 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 2021-11-24 10:44, Paul Moore wrote: > On Fri, Nov 19, 2021 at 1:02 PM Richard Guy Briggs wrote: > > On 2021-11-19 11:15, Paul Moore wrote: > > > On Thu, Nov 4, 2021 at 5:53 PM Richard Guy Briggs wrote: > > > > On 2021-11-04 17:29, Paul Moore wrote: > > > > > On Thu, Nov 4, 2021 at 5:00 PM Richard Guy Briggs wrote: > > > > > > > > > > > > AUDIT_TIME_* events are generated when there are syscall rules present that are > > > > > > not related to time keeping. This will produce noisy log entries that could > > > > > > flood the logs and hide events we really care about. > > > > > > > > > > > > Rather than immediately produce the AUDIT_TIME_* records, store the data and > > > > > > log it at syscall exit time respecting the filter rules. > > > > > > > > > > > > Please see https://bugzilla.redhat.com/show_bug.cgi?id=1991919 > > > > > > > > > > Unfortunately that URL isn't publicly accessible. It might be helpful > > > > > to simply add the relevant information to the commit description[1] > > > > > and omit the link entirely. Since this is just an RFC, please don't > > > > > resend the patch just to include that information, you can simply > > > > > reply to this thread with the additional info. > > > > > > > > Hmmm, sorry about that. There isn't really anything in that bz that > > > > shouldn't be public, but I'll check before openning it up... > > > > > > > > Basically it was a report that: > > > > TIME_ADJNTPVAL audit events are not generated if there are no syscalls > > > > rules, but that these events are generated when at least one unrelated > > > > syscall rule is added. > > > > > > > > This behaviour was confirmed but the conclusion about what should be the > > > > correct behaviour differed from that of the reporter. > > > > > > I'm still wondering about the best way to handle this situation, and I > > > want to make sure I'm understanding the problem correctly. So I'm > > > clear on the problem, is the issue that the AUDIT_TIME records are > > > being generated whenever at least one syscall filter is present, > > > regardless of if that syscall is time related? With the expected > > > behavior being that AUDIT_TIME records are only generated when a time > > > related syscall is being audited? > > > > Exactly. > > In that case it seems pretty similar to the PATH record and I would > think that handling it in a similar manner would be The Right Thing to > do ... which looks like what you are doing. > > You mentioned that you wanted to do some more work on this patch so > I'll hold off further comments until the updated patch is posted. I had a look at this patch and there is no further adjustment needed. The only note is that the AUDIT_TIME_ADJNTPVAL record is printed at the top of show_special() due to the need to potentially allocate multiple records. Do you think this requires a comment in the description or in the code just above the call to __audit_ntp_log_()? If not, please merge it at your convenience. Sorry to have dropped this ball. > paul moore - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635 -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit