Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5364595pxu; Wed, 21 Oct 2020 23:31:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeoVOYavGtz6CVMQnDKjyb8fg02ruJBVzNrx9+a8JB3aowSVhFZfv3MBfuM02IiHJeU8K6 X-Received: by 2002:a50:f307:: with SMTP id p7mr550018edm.235.1603348260915; Wed, 21 Oct 2020 23:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603348260; cv=none; d=google.com; s=arc-20160816; b=RTvFeanTYBeHijiL9UE7mF/eq9dmDkOt3WpOPK3Z6TAnqtyabKxG1cQSUh1FEaNwWZ lVUGs58iFjaCtEYlYoRpSHBlPnr8XyDCQV3t4DhU+Ghc3IgfsxuhNM/bFEkgxC7Ex9eP mboBp5R+e1CBRGcFyRDq7epTLT8aR7D5rDGmAFLJnPpr9qR++ALjEQySVtDfHsKj6d8q o1GgybbX2YVsV0pIK0kdSt7a9Ez5fXfdi+Kx/NNq64ZC13HGk9FudYiRqObZCXM9j0EL KFbBbqOxv5W3G4vjY4CRFimz2toJD/vKHq4UGvqkKuAYI+lcv5mJShQ++oV2DMAcxXit AS8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=0aM6MG+N6GRh+zh31VWFPduo2rgWm3emASszSAw8inM=; b=uxueHiNC/qg3uN4zg6M9pLx2uMUzbB0AI6DD4hxpU9hQJG+et+hT2PjM2ALTlUoGLi +gBBg0WukoQvTkHITJpmih9TFemH4aNJ8bpML6yV+oRKiXDXhWAUWTTxQawQZ0rI+sSk p5w9+5d+ligKE+/xVSAJgys6yF9ll2D7ZZOE9UbgaeZNjcw0k7E8iWPekHOtGxkqTcxh 6K91tzGuW/BEyH4goWivphVGQor4zuAw9WUKx1aNW/ZWTxlJTCFs6ZDMpPGFrPG3cgBU TkSI/YwfdXRT/C6kyr9xZnchHvOCmtLxigUajD1wkjG6oj+kFIWi54tFCLFN67RjwkY9 nfIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="U0/4Mb5f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si394985ede.408.2020.10.21.23.30.38; Wed, 21 Oct 2020 23:31:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="U0/4Mb5f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503751AbgJURxa (ORCPT + 99 others); Wed, 21 Oct 2020 13:53:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47398 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503752AbgJURx3 (ORCPT ); Wed, 21 Oct 2020 13:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603302808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0aM6MG+N6GRh+zh31VWFPduo2rgWm3emASszSAw8inM=; b=U0/4Mb5fklpftAKcRTvs5J4QNyh7WJkxazNleIkTfYT1ojDcgU7Jvza3xqN/pUyfJ++Gg3 VxJwwOKPwWsrsCfYPvvQTy6meaHtKMW/EqJbY8XdPfn6FCzGtlXFpufKx/DrFkiK7v6Oyg uG7HZNcykkT32tt4lzdMm6ffBifyrGA= 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-582-0BAAGVqzMda2Ab5lMPFbVA-1; Wed, 21 Oct 2020 13:53:23 -0400 X-MC-Unique: 0BAAGVqzMda2Ab5lMPFbVA-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 57DDD804B66; Wed, 21 Oct 2020 17:53:20 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E934B5D9EF; Wed, 21 Oct 2020 17:53:06 +0000 (UTC) Date: Wed, 21 Oct 2020 13:53:03 -0400 From: Richard Guy Briggs To: Steve Grubb Cc: Paul Moore , 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 Subject: Re: [PATCH ghak90 V9 05/13] audit: log container info of syscalls Message-ID: <20201021175303.GH2882171@madcap2.tricolour.ca> References: <20201002195231.GH2882171@madcap2.tricolour.ca> <20201021163926.GA3929765@madcap2.tricolour.ca> <2174083.ElGaqSPkdT@x2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2174083.ElGaqSPkdT@x2> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-10-21 12:49, Steve Grubb wrote: > On Wednesday, October 21, 2020 12:39:26 PM EDT Richard Guy Briggs wrote: > > > I think I have a way to generate a signal to multiple targets in one > > > syscall... The added challenge is to also give those targets different > > > audit container identifiers. > > > > Here is an exmple I was able to generate after updating the testsuite > > script to include a signalling example of a nested audit container > > identifier: > > > > ---- > > type=PROCTITLE msg=audit(2020-10-21 10:31:16.655:6731) : > > proctitle=/usr/bin/perl -w containerid/test type=CONTAINER_ID > > msg=audit(2020-10-21 10:31:16.655:6731) : > > contid=7129731255799087104^3333941723245477888 type=OBJ_PID > > msg=audit(2020-10-21 10:31:16.655:6731) : opid=115583 oauid=root ouid=root > > oses=1 obj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 > > ocomm=perl type=CONTAINER_ID msg=audit(2020-10-21 10:31:16.655:6731) : > > contid=3333941723245477888 type=OBJ_PID msg=audit(2020-10-21 > > 10:31:16.655:6731) : opid=115580 oauid=root ouid=root oses=1 > > obj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 ocomm=perl > > type=CONTAINER_ID msg=audit(2020-10-21 10:31:16.655:6731) : > > contid=8098399240850112512^3333941723245477888 type=OBJ_PID > > msg=audit(2020-10-21 10:31:16.655:6731) : opid=115582 oauid=root ouid=root > > oses=1 obj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 > > ocomm=perl type=SYSCALL msg=audit(2020-10-21 10:31:16.655:6731) : > > arch=x86_64 syscall=kill success=yes exit=0 a0=0xfffe3c84 a1=SIGTERM > > a2=0x4d524554 a3=0x0 items=0 ppid=115564 pid=115567 auid=root uid=root > > gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root > > tty=ttyS0 ses=1 comm=perl exe=/usr/bin/perl > > subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 > > key=testsuite-1603290671-AcLtUulY ---- > > > > There are three CONTAINER_ID records which need some way of associating > > with OBJ_PID records. An additional CONTAINER_ID record would be present > > if the killing process itself had an audit container identifier. I think > > the most obvious way to connect them is with a pid= field in the > > CONTAINER_ID record. > > pid is the process sending the signal, opid is the process receiving the > signal. I think you mean opid? If the process sending the signal (it has a pid= field) has an audit container identifier, it will generate a CONTAINER_ID record. Each process being signalled (each has an opid= field) that has an audit container identifier will also generate a CONTAINER_ID record. The former will be much more common. Which do we use in the CONTAINER_ID record? Having swinging fields, pid vs opid does not seem like a reasonable solution. Do we go back to "ref=pid=..." vs "ref=opid=..."? > -Steve - 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