Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2787107ybb; Mon, 30 Mar 2020 12:56:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvHDlzRlIgGYRHmIOVwoxP8ARXmQzitNSdZYsR/0Zv5vm8CaG0NtxUgASc4hO9Ko8RtF4op X-Received: by 2002:a9d:7a8:: with SMTP id 37mr10945389oto.209.1585598202522; Mon, 30 Mar 2020 12:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585598202; cv=none; d=google.com; s=arc-20160816; b=heatYbyGa56Ir1BLSvxBRiPbFUJeDP6EIqQ/j/vbTe5fyy2P4XQ7ofQr3cbk1bCqbH uFeUQC89R3LLJ7374OCDxwlx3xq3EfW327WsHrnmXxIKWDTuHBfVcwEaA5S6FlrDjNaq 00tAh8jX/DqGTZDkJFZmm2eaFqe9uA+/prkgaxpDqGTTLLO7uO4HOdg33EknUQH4fpft zmRuqp+LjaKip6s1frAbrK0oEx7tSwilIs+ItruQgbIbIfhg2EppxmGZ4phRqnmamI9S rHM9oA2+r6MpQtjGaAA0ZsZzqh5H189pM/fdjH6P9tM5wS4I59b/XOz1tlEwO9LpQyEK UU/A== 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=dh9JcSi6kj0UWIbirpsquHk1PO2ZTJ6f6wAxTa4W5Zs=; b=VGjuKXij2car3KDiPw6eUQ2Nd/Ht8pVBgfrJ8Wg+ebkEMUDygtaUvu/uAm0EwcvuYM KmsddqQ07/C0zGIjuUo/AJh4eCBgbYCbrc4OgrTijw39No5+rVG2AFblxhqcnzapgsgV lUhWraJhSsQsPVL/VpBIYDEvz6U0McF8fzhT1I9faq+p2wUICAVep8cqBTJfhpck+GR8 9Ha7FWFtaIY9KpJEhDWTo/YCa9BJqLNTMJYVsrFCVZQtSctM4tgG3UoVAdu5xVcbHUmo C8s9Q+e+mY/dwUtvycHS+O+HDhHsipVDKu9Act+TUr94bI04nJALdzhrun+gcaw5e5IK 6SJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=DZk2Ecad; 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 n9si6280582ota.103.2020.03.30.12.56.30; Mon, 30 Mar 2020 12:56:42 -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=DZk2Ecad; 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 S1728944AbgC3Tzs (ORCPT + 99 others); Mon, 30 Mar 2020 15:55:48 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34787 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727255AbgC3Tzr (ORCPT ); Mon, 30 Mar 2020 15:55:47 -0400 Received: by mail-ed1-f67.google.com with SMTP id o1so4066228edv.1 for ; Mon, 30 Mar 2020 12:55:46 -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=dh9JcSi6kj0UWIbirpsquHk1PO2ZTJ6f6wAxTa4W5Zs=; b=DZk2EcadSRy+jmjLIyyvOwCfhNdDlY3wMU3gTOTK1MOXJ9bZhFpym+h6ycl+idnIWn SsmZQJKtl9iTffn/DdsGsPysGCoyWM9UFc0uMIYHqOT2z5sBnbcDqL176yFWOcNWpk/v SL53a/gXGohE1DQca/J8rKY+wKFfgrlpBcJTWgpRRmqX4D4/lPWy9aotUaYsxCYmYiYK OtSNHNlZDTpDF0dFONn3fKYVj/3RoQP8vPxJqI1/s4VGJN+h5iwuRg6I0xGMy9Xnyver +2Vt0W54SbaK/bs9jzOVTjHv/eCoKKiYgbHkxhUe93AIoeTE2uwNruCrN5QeGM0qgjOo zdAg== 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=dh9JcSi6kj0UWIbirpsquHk1PO2ZTJ6f6wAxTa4W5Zs=; b=tNrKHoVgtWHoh0TR5Loi3F8mpNrERSlw1BvqMtJb89f05fGPnvr3fTovxgkIBVMtZO vo1Iah6sWLx461vK1H8eCZdkbBgPeDWzgYW+ZlPNikW04zEyNuH7N149Wxrtl1M9WUsY LK0e5vSe/mG+G4erJiEnc1ZkKSdrgQLw/T8ktA1VHn4Yjq7/9XykH/87Bu6wfS7RdP8S UpsIh9EPEhx/3//GCvTs1ioj/OnEcl7M6oL0+D01c2h2EytJTKFV4pUhp7R7LMQYKHe7 n7XlRujbOFSn35QUri67TLJ2jPIxn1w4nw/Q1txD/RCy9H1u2oB6fOr9xt8NbkTJpRU/ 7P1g== X-Gm-Message-State: ANhLgQ1AxdJAauVqeo4vNufF+mSUaViAx6X+C3h2NKfRAzdCNehv7hFo os8X0J2Fh0smPzJJ1ad3KCbRAkGV6uU3QXvvtOrB X-Received: by 2002:a50:f152:: with SMTP id z18mr12867397edl.31.1585598145722; Mon, 30 Mar 2020 12:55:45 -0700 (PDT) MIME-Version: 1.0 References: <20200318215550.es4stkjwnefrfen2@madcap2.tricolour.ca> <20200319220249.jyr6xmwvflya5mks@madcap2.tricolour.ca> <20200324210152.5uydf3zqi3dwshfu@madcap2.tricolour.ca> <20200330134705.jlrkoiqpgjh3rvoh@madcap2.tricolour.ca> <20200330162156.mzh2tsnovngudlx2@madcap2.tricolour.ca> <20200330174937.xalrsiev7q3yxsx2@madcap2.tricolour.ca> In-Reply-To: <20200330174937.xalrsiev7q3yxsx2@madcap2.tricolour.ca> From: Paul Moore Date: Mon, 30 Mar 2020 15:55:36 -0400 Message-ID: Subject: Re: [PATCH ghak90 V8 07/16] audit: add contid support for signalling the audit daemon To: Richard Guy Briggs 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 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 Mon, Mar 30, 2020 at 1:49 PM Richard Guy Briggs wrote: > On 2020-03-30 13:34, Paul Moore wrote: > > On Mon, Mar 30, 2020 at 12:22 PM Richard Guy Briggs wrote: > > > On 2020-03-30 10:26, Paul Moore wrote: > > > > On Mon, Mar 30, 2020 at 9:47 AM Richard Guy Briggs wrote: > > > > > On 2020-03-28 23:11, Paul Moore wrote: > > > > > > On Tue, Mar 24, 2020 at 5:02 PM Richard Guy Briggs wrote: > > > > > > > On 2020-03-23 20:16, Paul Moore wrote: > > > > > > > > On Thu, Mar 19, 2020 at 6:03 PM Richard Guy Briggs wrote: > > > > > > > > > On 2020-03-18 18:06, Paul Moore wrote: ... > > > Well, every time a record gets generated, *any* record gets generated, > > > we'll need to check for which audit daemons this record is in scope and > > > generate a different one for each depending on the content and whether > > > or not the content is influenced by the scope. > > > > That's the problem right there - we don't want to have to generate a > > unique record for *each* auditd on *every* record. That is a recipe > > for disaster. > > I don't see how we can get around this. > > We will already have that problem for PIDs in different PID namespaces. As I said below, let's not worry about this for all of the known/current audit records, lets just think about how we solve this for the ACID related information. One of the bigger problems with translating namespace info (e.g. PIDs) across ACIDs is that an ACID - by definition - has no understanding of namespaces (both the concept as well as any given instance). > We already need to use a different serial number in each auditd/queue, > or else we serialize *all* audit events on the machine and either leak > information to the nested daemons that there are other events happenning > on the machine, or confuse the host daemon because it now thinks that we > are losing events due to serial numbers missing because some nested > daemon issued an event that was not relevant to the host daemon, > consuming a globally serial audit message sequence number. This isn't really relevant to the ACID lists, but sure. > > Solving this for all of the known audit records is not something we > > need to worry about in depth at the moment (although giving it some > > casual thought is not a bad thing), but solving this for the audit > > container ID information *is* something we need to worry about right > > now. > > If you think that a different nested contid value string per daemon is > not acceptable, then we are back to issuing a record that has only *one* > contid listed without any nesting information. This brings us back to > the original problem of keeping *all* audit log history since the boot > of the machine to be able to track the nesting of any particular contid. I'm not ruling anything out, except for the "let's just completely regenerate every record for each auditd instance". > What am I missing? What do you suggest? I'm missing a solution in this thread, since you are the person driving this effort I'm asking you to get creative and present us with some solutions. :) -- paul moore www.paul-moore.com