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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 00E6BC433E0 for ; Tue, 26 Jan 2021 20:50:30 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83702221FC for ; Tue, 26 Jan 2021 20:50:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83702221FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611694228; 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=PEBAfFWJMh9SkRZdaSvFrVu4mdG13UFC7lPjiZXks9U=; b=W5SjRgvh9W/GO1Z8MEidOrATd3BdTkvZaZ5Y39sjSXDfkhK6MuzixOiHEXoeOYHZDMSlb7 W5X2srwwZOxzozWstuXCRM753wl6hm9Gls07y9Priv7HOSWJGp+t+CMmXA34aS391r+JMm O5tiJjYMy/fHTU1+gIm9Vc4SEpeWArQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-274-19_oKDCCPD6w4sEHmFdsAw-1; Tue, 26 Jan 2021 15:50:24 -0500 X-MC-Unique: 19_oKDCCPD6w4sEHmFdsAw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0BED78030B3; Tue, 26 Jan 2021 20:50:21 +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 E456D6F80A; Tue, 26 Jan 2021 20:50:20 +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 4F5194A7C6; Tue, 26 Jan 2021 20:50:02 +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 10QKgep1001192 for ; Tue, 26 Jan 2021 15:42:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id B3EFB648A1; Tue, 26 Jan 2021 20:42:40 +0000 (UTC) Received: from x2.localnet (ovpn-116-57.rdu2.redhat.com [10.10.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF4306E515; Tue, 26 Jan 2021 20:42:34 +0000 (UTC) From: Steve Grubb To: burn@swtf.dyndns.org Subject: Re: Occasional delayed output of events Date: Tue, 26 Jan 2021 15:42:34 -0500 Message-ID: <5679566.lOV4Wx5bFT@x2> Organization: Red Hat In-Reply-To: References: <30c5dbc14368a1919717e2f39d2d4c29463c3108.camel@iinet.net.au> <01a61bf10b409134ec57c2d419a33623f16010a9.camel@iinet.net.au> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: linux-audit@redhat.com Cc: Richard Guy Briggs , Linux Audit 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.79 on 10.5.11.11 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tuesday, January 26, 2021 6:53:31 AM EST Burn Alting wrote: > On Tue, 2021-01-26 at 11:29 +1100, Burn Alting wrote: > > On Mon, 2021-01-25 at 19:20 -0500, Steve Grubb wrote: > > > On Monday, January 25, 2021 7:11:45 PM EST Burn Alting wrote: > > > > On Mon, 2021-01-25 at 18:53 -0500, Steve Grubb wrote: > > > > > On Saturday, January 23, 2021 5:55:44 PM EST Burn Alting wrote: > > > > > > > > How is the following for a way forward.a. I will author a > > > > > > > > patch to the > > > > > > > > user space code to correctly parsethiscondition and submit it > > > > > > > > on the > > > > > > > > weekend. It will be via a newconfiguration item to > > > > > > > > auditd.conf just in > > > > > > > > case placing a fixedextended timeout (15-20 secs) affects > > > > > > > > memory usage > > > > > > > > for users of theauparse library. This solves the initial > > > > > > > > problem > > > > > > > > ofausearch/auparsefailing to parse generated audit.b. I am > > > > > > > > happy to > > > > > > > > instrument whateveris recommended on my hosts at home (vm's > > > > > > > > and bare > > > > > > > > metal) to providemore information, should we want to > > > > > > > > 'explain' the > > > > > > > > occurrence, givenIsee this every week or two and report back. > > > > > > > > > > > > > > Seems reasonable to me. > > > > > > > > > > > > I can implement the 'end_of_event_timeout' change either asi. a > > > > > > command > > > > > > line argument to ausearch/aureport (say --eoetmo secs) andanew > > > > > > pair of > > > > > > library functions within the auparse() stable > > > > > > (sayauparse_set_eoe_timeout() and auparse_get_eoe_timeout())orii. > > > > > > a > > > > > > configuration item in /etc/audit/auditd.conf, or > > > > > > > > > > > > Which is your preference? Mine is i. as this is a user space > > > > > > processingchange, not a demon change. > > > > > > > > > > To be honest, I'm not entirely sure what we're seeing. I run some > > > > > teststoday on my system. It's seeing issues also. I'd still like > > > > > to treat theroot cause of this. But we do need to change the > > > > > default. That I whatI'm trying to figure out. > > > > > Back to your question, I'm wondering if we should do both? A > > > > > changeabledefault in auditd.conf and an override on the command > > > > > line. > > > > > > > > So far, all items in /etc/audit/auditd.conf appear to only affect > > > > thedaemon. Is this the right location to start adding > > > > non-daemonconfiguration items? (I accept there is no other place). > > > > > > ausearch/report/auparse all read the auditd.conf to find the canonical > > > location for where the logs are supposed to be. So, they already read > > > this file. I'd rather keep it there than make yet another config. The > > > only drawback it that it might again confuse people that auditd really > > > doesn't do anything with the records but just some light processing. > > > > OK. I will put it in /etc/audit/auditd.conf > > One question with this solution. If the user does not have read permission > to /etc/audit/auditd.conf, then any change cannot take effect. The default > mode for this file is 640 to root, so a non-root user could never change > the timeout. Right, but since they cannot access the logs, it's not a problem in general. But if they so happen to have a local copy of logs, then the command line override should allow them to correct this. I am also reviewing things to see if a better default can be picked. > Should I also add - a command line argument to ausearch/aureport (say -- > eoetmo secs) and, - a pair of new auparse() functions - > auparse_set_eoe_timeout() and auparse_get_eoe_timeout() > so that non root users can make use of the new configuration item. Yes, that is what I meant by doing both. We have default in auditd.conf that works for everyone with direct audit access. We have a commandline option for overriding the auditd.conf value. Although, I don't know why we would want to get the eoe_timeout value? I can't imagine a use for it right now. As for ausearch/report, let's just make a long option --eoe-timeout -Steve > Also, do you want the default timeout to be 2 seconds or should I make it > higher. I'm likely to adjust it, but I'm still looking to see what is happening. Just go with the 2 second default for now. Thanks, -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit