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=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C82D6C4332E for ; Wed, 18 Mar 2020 21:27:46 +0000 (UTC) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B2D820775 for ; Wed, 18 Mar 2020 21:27:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YFDnGDEB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B2D820775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.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=1584566865; 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=JWsFXXQ/euNVPsJqQvhShYY3UfEMVOWRzI1ASjknQCI=; b=YFDnGDEBqrvSbsq1m/N1gUWbZKe4CGr+n4G08yY1fXDFRnnVCPgx1kPXYXshXA9SLMT0AY u/mvm54WatHwrzhns6e5+Hwaml5S2aUQlzDni4dl5/KB/AD5rQDR5ASO7rExmXrcr5xF0J BD8tVVdTZfuOjUexGrVPSzTKCFfY55E= 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-192-c732DedSMbKq13xRBjbXkA-1; Wed, 18 Mar 2020 17:27:43 -0400 X-MC-Unique: c732DedSMbKq13xRBjbXkA-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 83C538014D3; Wed, 18 Mar 2020 21:26:54 +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 56D6E9CA3; Wed, 18 Mar 2020 21:26:54 +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 1828F860FE; Wed, 18 Mar 2020 21:26:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02ILQq3O006838 for ; Wed, 18 Mar 2020 17:26:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 10F5660C18; Wed, 18 Mar 2020 21:26:52 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.36.110.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66A7560BF1; Wed, 18 Mar 2020 21:26:36 +0000 (UTC) Date: Wed, 18 Mar 2020 17:26:30 -0400 From: Richard Guy Briggs To: Paul Moore Subject: Re: [PATCH ghak90 V8 07/16] audit: add contid support for signalling the audit daemon Message-ID: <20200318212630.mw2geg4ykhnbtr3k@madcap2.tricolour.ca> References: <20200204231454.oxa7pyvuxbj466fj@madcap2.tricolour.ca> <3142237.YMNxv0uec1@x2> <20200312193037.2tb5f53yeisfq4ta@madcap2.tricolour.ca> <20200313185900.y44yvrfm4zxa5lfk@madcap2.tricolour.ca> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: linux-audit@redhat.com Cc: nhorman@tuxdriver.com, linux-api@vger.kernel.org, containers@lists.linux-foundation.org, LKML , dhowells@redhat.com, linux-audit@redhat.com, netfilter-devel@vger.kernel.org, ebiederm@xmission.com, simo@redhat.com, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, Eric Paris , mpatel@redhat.com, Serge Hallyn 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 2020-03-18 16:56, Paul Moore wrote: > On Fri, Mar 13, 2020 at 2:59 PM Richard Guy Briggs wrote: > > On 2020-03-13 12:29, Paul Moore wrote: > > > On Thu, Mar 12, 2020 at 3:30 PM Richard Guy Briggs wrote: > > > > On 2020-02-13 16:44, Paul Moore wrote: > > > > > This is a bit of a thread-hijack, and for that I apologize, but > > > > > another thought crossed my mind while thinking about this issue > > > > > further ... Once we support multiple auditd instances, including the > > > > > necessary record routing and duplication/multiple-sends (the host > > > > > always sees *everything*), we will likely need to find a way to "trim" > > > > > the audit container ID (ACID) lists we send in the records. The > > > > > auditd instance running on the host/initns will always see everything, > > > > > so it will want the full container ACID list; however an auditd > > > > > instance running inside a container really should only see the ACIDs > > > > > of any child containers. > > > > > > > > Agreed. This should be easy to check and limit, preventing an auditd > > > > from seeing any contid that is a parent of its own contid. > > > > > > > > > For example, imagine a system where the host has containers 1 and 2, > > > > > each running an auditd instance. Inside container 1 there are > > > > > containers A and B. Inside container 2 there are containers Y and Z. > > > > > If an audit event is generated in container Z, I would expect the > > > > > host's auditd to see a ACID list of "1,Z" but container 1's auditd > > > > > should only see an ACID list of "Z". The auditd running in container > > > > > 2 should not see the record at all (that will be relatively > > > > > straightforward). Does that make sense? Do we have the record > > > > > formats properly designed to handle this without too much problem (I'm > > > > > not entirely sure we do)? > > > > > > > > I completely agree and I believe we have record formats that are able to > > > > handle this already. > > > > > > I'm not convinced we do. What about the cases where we have a field > > > with a list of audit container IDs? How do we handle that? > > > > I don't understand the problem. (I think you crossed your 1/2 vs > > A/B/Y/Z in your example.) ... > > It looks like I did, sorry about that. > > > ... Clarifying the example above, if as you > > suggest an event happens in container Z, the hosts's auditd would report > > Z,^2 > > and the auditd in container 2 would report > > Z,^2 > > but if there were another auditd running in container Z it would report > > Z > > while the auditd in container 1 or A/B would see nothing. > > Yes. My concern is how do we handle this to minimize duplicating and > rewriting the records? It isn't so much about the format, although > the format is a side effect. Are you talking about caching, or about divulging more information than necessary or even information leaks? Or even noticing that records that need to be generated to two audit daemons share the same contid field values and should be generated at the same time or information shared between them? I'd see any of these as optimizations that don't affect the api. > 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://www.redhat.com/mailman/listinfo/linux-audit