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.5 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 8DF83C4338F for ; Wed, 11 Aug 2021 19:06:53 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A6F060EB9 for ; Wed, 11 Aug 2021 19:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2A6F060EB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628708812; 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=GMtNM9QOaYDOOS6Puj6eH+a4N8k0zKb1oH0+cAIIe+Y=; b=QhpiDpWnuwRxKFxSn2VEbFkcvEaLNVpejenQx5foaM+5ApgYzF4dZ18Cc9nIs8L007TkXB o8vnF/90BHfhK+M+0u/BixHUPfKidhWsenXjQCbKEeKWXf+A7CyRYeBX+W6rTlsyPE6auF 9EcsT8llJ68mnaPxRcWjaBlt5N2V5z4= 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-42-DuNWkYt-Mbu6oD7VJzDeJQ-1; Wed, 11 Aug 2021 15:06:50 -0400 X-MC-Unique: DuNWkYt-Mbu6oD7VJzDeJQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A6478799ED; Wed, 11 Aug 2021 19:06:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A60260C9D; Wed, 11 Aug 2021 19:06:46 +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 43DFD181A0F7; Wed, 11 Aug 2021 19:06:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17BJ4aDW001890 for ; Wed, 11 Aug 2021 15:04:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7587B5D9DE; Wed, 11 Aug 2021 19:04:36 +0000 (UTC) Received: from x2.localnet (unknown [10.22.8.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id 230185D9CA; Wed, 11 Aug 2021 19:04:32 +0000 (UTC) From: Steve Grubb To: linux-audit@redhat.com Subject: Re: BUG: segfault on systemctl auditd stop Date: Wed, 11 Aug 2021 15:04:30 -0400 Message-ID: <3128346.aeNJFYEL58@x2> Organization: Red Hat In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: linux-audit@redhat.com Cc: "Brown, Thomas" 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.12 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 Hello, On Wednesday, August 11, 2021 1:32:37 PM EDT Brown, Thomas wrote: > The following auditd segfault occurs during shutdown but can be > reproduced using the service stop command... Which version of the audit package is this? There was a known shutdown problem on 3.0.3 that was fixed in 3.0.4. > service auditd stop 2root@aug-test:/# 2021 Aug 4 12:47:22 aug-test > Process 687 (auditd) of user 0 dumped core. 34Stack trace of thread 687: > 5#0 0x00007f18bb1657e4 fclose (libc.so.6) 6#1 0x000055b88ab50ec0 n/a > (auditd) 7#2 0x000055b88ab4e421 n/a (auditd) 8#3 0x000055b88ab4d9a7 n/a > (auditd) 9#4 0x00007f18bb11a09b __libc_start_main (libc.so.6) 10#5 > 0x000055b88ab4df4a n/a (auditd) This says auditd dumped core on a fclose. My guess would be that it's in auditd-event.c. > Setting AUDIT_WRITE_LOGS to "yes" corrects this problem however we have > a requirement to disable these logs (i.e. AUDIT_WRITE_LOGS needs to be > set to "no") > > After perusing the source I suspect that one of these unconditional > fclose()s is causing the problem... Thanks for looking. But the patch applies to standalone utilities rather than the audit daemon. > However I have not tested these changes. Even though this is a benign > problem I believe that it warrants a correction. Please open a ticket > and respond with the ticket id so that we can track this problem/solution. I am about to release audit-3.0.5 today. I think I see a couple places where this could use an if (log_file). It would be helpful to know which version of the audit package that you are using. Thanks, -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit