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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 30A35C433E0 for ; Fri, 29 May 2020 19:02:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB7DB2077D for ; Fri, 29 May 2020 19:02:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D5XRosdC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB7DB2077D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590778962; 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=V8vk6uk6Km/xRq8qNa4rsgEoqicE1UdweGy748qM4i4=; b=D5XRosdCYnsOzqshnlV9IwegbjcjBx7PXvZzegdrtrsEaV7a3UBzbZqGyO1WJ7vsaKtTse lq07u/ZQIbx2aJp2vp4V/d+ECNTIbZOy35xt60S+6gFCiEonMph+QNgshKaZuQnymQ5f+b NSIJJicM4//Hhcw1EyhrtsUoRgnxkug= 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-87-mLyKRV7HPAO1XOd0FJ7SxA-1; Fri, 29 May 2020 15:02:21 -0400 X-MC-Unique: mLyKRV7HPAO1XOd0FJ7SxA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A574F464; Fri, 29 May 2020 19:02:16 +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 36F6E5D9D5; Fri, 29 May 2020 19:02:15 +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 2B9246EF5E; Fri, 29 May 2020 19:02:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04TJ2Bg3011971 for ; Fri, 29 May 2020 15:02:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id CCF13F6CD9; Fri, 29 May 2020 19:02:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B853CF6CC1 for ; Fri, 29 May 2020 19:02:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 90CE48007D4 for ; Fri, 29 May 2020 19:02:04 +0000 (UTC) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459-u8KUp3jsMZyK8MqZMLGB1g-1; Fri, 29 May 2020 15:02:01 -0400 X-MC-Unique: u8KUp3jsMZyK8MqZMLGB1g-1 Received: by mail-ej1-f44.google.com with SMTP id l27so3127894ejc.1 for ; Fri, 29 May 2020 12:02:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yPJtj4+qUb8IfkdS1T+qt5tadYObI8kK3EYDbOARuvc=; b=R56du7F8VMSysGkRjR7kub4zcLu35T12UqjJG64q0ge+zDTlNQUg3H+0pGv4NU/7Qd 9bugiLeNyUhpXTx8A0MEqg9du0m/qMGgq1XdcmXXaRXQdkWCaSKi30Ck0Dxs3yFLSgKs TQHo7vJFxlggiM0JnkCkAvSoalf7iZzAn1h3CklKaTCQPwsGYb4GXhrDAil6ZTIzFddD RpXZkaDOUvVkC6H5B313yU6A9Y6xXFBqmhj3brHflTL2PfrB2IAnKJvWbHuhkiOq5Trm oYhRtsUdb3GvemLcnFihX/kpHs4bI5mTs21ZKWAs6hbJRkd+e6XKOPgDAnvsk7mq0o50 470Q== X-Gm-Message-State: AOAM533ZkXdTvPpi9pJ4pDGLs1YDiH04QEdIOnGuVjlJ+NEgAPrQsHFz yr6Nv7PNbV696gQhtbXE9WLm1i66EgGSjlHSC+uFsCQ= X-Google-Smtp-Source: ABdhPJxTRDObnuzGCtw/vqlCZQZ+nOHHcqmRhOaonVpnmxqPsZkzXY2SVP7TwR2mpsvAqtXwJuYqbn5iX8gNhFxVOCM= X-Received: by 2002:a17:907:b13:: with SMTP id h19mr8677526ejl.488.1590778920327; Fri, 29 May 2020 12:02:00 -0700 (PDT) MIME-Version: 1.0 References: <45ce3357-ca82-8721-22d6-dabe751ad8fa.ref@schaufler-ca.com> <45ce3357-ca82-8721-22d6-dabe751ad8fa@schaufler-ca.com> In-Reply-To: <45ce3357-ca82-8721-22d6-dabe751ad8fa@schaufler-ca.com> From: Paul Moore Date: Fri, 29 May 2020 15:01:49 -0400 Message-ID: Subject: Re: The audit "context" and when to expect it. To: Casey Schaufler X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: linux-audit@redhat.com Cc: Richard Guy Briggs , 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.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, May 29, 2020 at 1:59 PM Casey Schaufler wrote: > What does a NULL audit context (e.g. ab->cxt == NULL) tell > me about the status of the audit buffer? It seems like it should > be telling me that the audit buffer is being created for some > purpose unrelated to the current task. And yet there are places > where information is pulled from the current task even when > the cxt is NULL. The simple answer is that a NULL audit_context indicates a standalone record, meaning a record with a unique timestamp so that it is not associated with any other records into an event. If the audit_context it not NULL then the information in the context is used to group, or associate, all of the records sharing that context into a single event. This is just one example, but a non-NULL audit_context is how PATH records end up being associated with SYSCALL records in a single event. -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit