Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp345357ybx; Wed, 30 Oct 2019 16:16:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS/ZhY6k9wu1KbhfxFm/5Vqlk1sUxH7N2pHsY1AVCAAcG/eE3xp1FkBk+m3UTzK8dc8EPj X-Received: by 2002:aa7:ca0b:: with SMTP id y11mr2574383eds.51.1572477394352; Wed, 30 Oct 2019 16:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572477394; cv=none; d=google.com; s=arc-20160816; b=XiIzAh9aBq1xpSEKCdzjv37LljZ/M3NGstaWkWoIihmu86BA6QSgH0zGIi2GhsFpvQ kLzG4TlEgO7ycAovpn2iU4w/ueUBHbpJwt4/hMW0G3JQJTfNsQV/yHeguE+/LdH96jIl GGGV+WHz8b4I6x1W+pnRE1o0654bg3siLfj+lC3qAN6IHxwj3xzRkl20TFigw+zhvL2K kQq+w98l4Qwi856mumVvds9FvesyTuWW0borFn87rEQrAAzPU29XDjVNr3ejR+sAdrlb HqeZrev9OmSjUQ80D25pz5Odu/urI9MDWNbkIUiGogZvaAFXeqmZdDdyoJHYYv9llxFs nqOg== 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=PZw4hUcpDDeEECYWt5oKzqEsWCt5if9tCmjtkMvGZZc=; b=B4RrppVYx3TpCEtrtS0gixJwKQklph0isye2PoD/AG+OWLNofQ+T7gnS8uXJ5TijVd e+fyHFkbg0hkPwO4kQbcH+kyq269Vkp3mY0/t9NwPZGb5RNG+Tz5NY5Ro07ZyOHOtqN0 I6RvHIDXpf0TAP0ehAT7CaOtcXzBLdONh6TYV8m4Za0zzs26SeaAbIeY8i1pNi4A8oqi t3MfK33JopXtKXqFFoXTdRX3OoWqA0QEMsT4/qcrjvWv28WhjhGWENSc2ljYzIeGhem/ 1pojJqc8U68A8J1S/YdBZAwt0zj8mIX8GTYIftMyToxVlymFPyvJrUbc57jHKZY+bzq6 Lpnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=kVXUCm5X; 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 e22si2775502ede.163.2019.10.30.16.16.10; Wed, 30 Oct 2019 16:16:34 -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=kVXUCm5X; 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 S1726903AbfJ3UdJ (ORCPT + 99 others); Wed, 30 Oct 2019 16:33:09 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46203 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbfJ3UdJ (ORCPT ); Wed, 30 Oct 2019 16:33:09 -0400 Received: by mail-lj1-f194.google.com with SMTP id w8so4121880lji.13 for ; Wed, 30 Oct 2019 13:33:06 -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=PZw4hUcpDDeEECYWt5oKzqEsWCt5if9tCmjtkMvGZZc=; b=kVXUCm5X6CCOwy3PrkvG8ynq72GLC65upZkmDyjLUB02BH0FDQdUbgOtudVOF7kWIU /yYbkuNCFW9ggROV0FS4Q5s91jSFfgDgeUErkMGCEN1ZwREfMy1NCtZTH2euSXS+bXAI +0Pxezte5/LmQNgNAvq/jBGkxT9+cx+7WYa0ZTyeDmyNP47fS+iCQoIgRM9dcOmAoOfB ow38H55a7FOBuTU984DCypUFmnLIxSjK1Uda+b4SYvQqXY5oRtoC2hMOz+Hbrce3JWLS 3tXmml2BE/xG70rKxHcQQodoA1dieVC//O/kr9sd8uyOrOR+hPJs9AB9O7oTR39zsD8t GH4A== 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=PZw4hUcpDDeEECYWt5oKzqEsWCt5if9tCmjtkMvGZZc=; b=d4gtzGB3QBGbVoZAN8qBQ9i7DtAFu656o6gNwatebqMZXTTYHq4LQV7KjGw+Rg99LV QlE0tV3sL4nnSDkcGmb/ir4LYt3waXuR470dpt/ZtrSqWp8edjW8J9axwTxq75b1SOoQ aJFA60JWMS0+HVsR/OBw3Vx2z/4X5iCOZKcqc3gevAGDCnSG/fUJLLjl8hFq7IyREnVV yIf8Onr03yLrvRjB2EzaMn452TbqKJQu1dc4T931YeH/8yxa1qCooxbu0F/9rHJaWA6T MBHr0By0mJwzuv3Y5sp91jCvWqOlFQEr6J2AGXuQajm+569dQvIJ5VLqrWRa5uqfJelq kHiw== X-Gm-Message-State: APjAAAUkBHEVyY6cpOgvxv3Zm5lJIPqwNC2IwBSHHndXwlZo6wEQwGPo 0f0V3ZSjNiRO9uNLWVs0TSn5/+683k5SV1lfgNDf X-Received: by 2002:a2e:8987:: with SMTP id c7mr1107993lji.225.1572467585472; Wed, 30 Oct 2019 13:33:05 -0700 (PDT) MIME-Version: 1.0 References: <16abf1b2aafeb5f1b8dae20b9a4836e54f959ca5.1568834524.git.rgb@redhat.com> <20191024220814.pid5ql6kvyr4ianb@madcap2.tricolour.ca> In-Reply-To: <20191024220814.pid5ql6kvyr4ianb@madcap2.tricolour.ca> From: Paul Moore Date: Wed, 30 Oct 2019 16:32:54 -0400 Message-ID: Subject: Re: [PATCH ghak90 V7 14/21] audit: contid check descendancy and nesting To: Richard Guy Briggs Cc: containers@lists.linux-foundation.org, linux-api@vger.kernel.org, Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, LKML , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, sgrubb@redhat.com, omosnace@redhat.com, dhowells@redhat.com, simo@redhat.com, Eric Paris , Serge Hallyn , ebiederm@xmission.com, nhorman@tuxdriver.com, Dan Walsh , mpatel@redhat.com 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, Oct 24, 2019 at 6:08 PM Richard Guy Briggs wrote: > On 2019-10-10 20:40, Paul Moore wrote: > > On Wed, Sep 18, 2019 at 9:26 PM Richard Guy Briggs wrote: > > > ?fixup! audit: convert to contid list to check for orch/engine ownership > > > > ? > > > > > Require the target task to be a descendant of the container > > > orchestrator/engine. > > > > > > You would only change the audit container ID from one set or inherited > > > value to another if you were nesting containers. > > > > > > If changing the contid, the container orchestrator/engine must be a > > > descendant and not same orchestrator as the one that set it so it is not > > > possible to change the contid of another orchestrator's container. > > > > Did you mean to say that the container orchestrator must be an > > ancestor of the target, and the same orchestrator as the one that set > > the target process' audit container ID? > > Not quite, the first half yes, but the second half: if it was already > set by that orchestrator, it can't be set again. If it is a different > orchestrator that is a descendant of the orchestrator that set it, then > allow the action. > > > Or maybe I'm missing something about what you are trying to do? > > Does that help clarify it? I think so, it's pretty much as you stated originally: "Require the target task to be a descendant of the container orchestrator/engine". It's possible I misread something in the patch, or got lost in all the ?fixup! patching. I'll take a closer look at the next revision of the patchset to make sure the code makes sense to me, but the logic seems reasonable. -- paul moore www.paul-moore.com