Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1911097ybh; Fri, 13 Mar 2020 09:31:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv+8BIc/25VDzQV6AQbPk7iwBzf3uhVNwpuLMNbTUaSGBvOalqfTBflzPWjv4tQMyVtjqQB X-Received: by 2002:aca:4b56:: with SMTP id y83mr7878037oia.142.1584117059932; Fri, 13 Mar 2020 09:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584117059; cv=none; d=google.com; s=arc-20160816; b=kExrGAfT35Ir5+m011lCO4rQzM/LocaWUmcabBxEVQPL40JcSrOo0JGSEH+Zgbq0Dj CTgCcEXxsj9k9xEq/cOjJFVyEjumRlswCNwNFtE5RJnFPGz2DuP/OCZM0DbI82kUz+rO QG86vyDFXKmGZtpW3AU9NLNqtRqhfw7+S+tIAots8nmvhuUY8Pt93SXlYAXICs4ttwqa npqmafBil0WHqs/vsDWC0TRsBTQzZoUw/lP2RxynuAJ4FNrdQvtyVB+O/Kvs1nucomRe zly2QinIs/mP4+QYAIFqQ/AWDCAX07R6uLuw3Z5BWVibwVYqMzxQiHXZSCKzZ8oJCv5D 42sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KQ+pObvU67uvaK3l1r4Ceb5YYAtUXZc7zlplXO9TGzk=; b=bvCVf7+POeO5QH9u5GilKSB4hAJqkGBXzq8Qb1LALudw+ODlTG/dpaH0u4qM+5CroI h6q8CaYj8ZAvYFi4HbaESRNnF0FwXlu1x2YHkXzgp/C8sfIBSBubJgJ5HokWwixyah81 lyydPpV+adCMF3nozjQW26L0r1rA6OQFhESDcbJomu3NCVQLc2sMKhLHUjlw3Zeq/L6R 7xTjGM3lamnGfIylgUobuO/JfdIF8xBLaSJC1yh3JumP2lfRRsnTju5U8F+Zcutb4heH CcjHMWgJ8q1WW+G9PXas9sUdy68ePpSh3aUXwtYMhNkUakY6A1DwQKZIMiIcfz7iNgk/ 7U6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=wNEa9VbC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o63si1949045oih.74.2020.03.13.09.30.44; Fri, 13 Mar 2020 09:30:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=wNEa9VbC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbgCMQ3X (ORCPT + 99 others); Fri, 13 Mar 2020 12:29:23 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:41904 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbgCMQ3X (ORCPT ); Fri, 13 Mar 2020 12:29:23 -0400 Received: by mail-ed1-f65.google.com with SMTP id m25so12577169edq.8 for ; Fri, 13 Mar 2020 09:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KQ+pObvU67uvaK3l1r4Ceb5YYAtUXZc7zlplXO9TGzk=; b=wNEa9VbCq5ppXpJfo1/v31ZhKG8uPf7PzMenc8z6vmEiPRA9w/pPKyW5PupisZ+2wm /1jR1aTmSmwc3VGYzygElLlxIeYf8iDy+ZYBCCFSAzNIo4Qhqf2EVsQY2xdC+JJray49 u01vKpsXb8UXTPq9xL8qVflCmkWMFcPy3ohoVOFO6yr5Wx5vOxDNototKpEKY+8oXZNU ZY3T4uEoba21JC3zCnFHzr6tNBDmVkym5KePwLGcs3xFJU7aw/cie5ZNNSC+vyHPPitf 6TxueY9wS4q7IPVNWnMTG7h0eYTj8SBvSH5GSRB+1Qrpcnnc6Wf/I+hp69E09N7FxlEV 0bxw== 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=KQ+pObvU67uvaK3l1r4Ceb5YYAtUXZc7zlplXO9TGzk=; b=fn6rCtRqFmBvDBRrGHe4xrLLzYBFBhZi1bVJPDz6S9HW6IVWPCQy8penqRUdCXo+Oy oiE+/ikuO+GDQY0MqwdUBBjMtOMsMzM8oiD4PQf494TamP7Lv4khh9U3X68o7wTUvaj5 VhzxcMYtnq0Ao+ELv50PZLIMsLc96Wm/g1FwqG0dNqbFSGTwnP1J6bXyisQwHnuHDWpn ZfWZD1CS32iV4cWohBCD2Hf7/DILIixtNEsEU4qDwgpa/4HoFt6OVMSJProCuoYCoFZn 4ddnHZdmXo/Enh9ug0FGE+MMUmji1J3G0dyuY4wnpwcPR3ecXEMdTeNB92CHQTSt4DNA 7QCA== X-Gm-Message-State: ANhLgQ1es9u6czHf9jMJUniUWhAFJpZij0EYYzzjmNLCkI9nIzHNl2nW MTLkljEcsrYuz5bl2wN/bsQa/+6zwMpsB3HZKH+y X-Received: by 2002:a17:907:105a:: with SMTP id oy26mr3891035ejb.308.1584116962089; Fri, 13 Mar 2020 09:29:22 -0700 (PDT) MIME-Version: 1.0 References: <20200204231454.oxa7pyvuxbj466fj@madcap2.tricolour.ca> <3142237.YMNxv0uec1@x2> <20200312193037.2tb5f53yeisfq4ta@madcap2.tricolour.ca> In-Reply-To: <20200312193037.2tb5f53yeisfq4ta@madcap2.tricolour.ca> From: Paul Moore Date: Fri, 13 Mar 2020 12:29:10 -0400 Message-ID: Subject: Re: [PATCH ghak90 V8 07/16] audit: add contid support for signalling the audit daemon To: Richard Guy Briggs Cc: Steve Grubb , linux-audit@redhat.com, nhorman@tuxdriver.com, linux-api@vger.kernel.org, containers@lists.linux-foundation.org, LKML , dhowells@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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- paul moore www.paul-moore.com