Received: by 10.192.165.156 with SMTP id m28csp78758imm; Wed, 18 Apr 2018 17:43:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx499+3MQLHrNZk0E6eJVAsaWMOvUU6xnh9N3KfS8QWuz//OytG8bgRBF3PLfeKB8iLI+mt+H X-Received: by 10.99.123.20 with SMTP id w20mr3402643pgc.124.1524098581429; Wed, 18 Apr 2018 17:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524098581; cv=none; d=google.com; s=arc-20160816; b=jZugozR9laz/ubuv8GNJ4Dzvs0Gb4DN2v25jj+DQFgPVCSHCTicUeeqxYh2n20hPA7 xvRI+RVy+cjg/A7HdeMHz0QgwYlwCMsr90HDxWFH0jGvyuD1FN7UMhEh2F3Id5oSi+ip xshNw1lJ540T53rEcL+hG5KLTCbFbsc1Gmz2/ZkREQOe4LpqiMTzI3PBe3O/CXRT2l7b XBthnDBnYQF851FQcwJ0i4u0GDON3FkHqWWu9ojphntBGg20RQsJxjvzP3PA3vjt7ThW iPlkpnYRzYs+7DTKGcvoc47hfMpyG8WMeYW6U9I9+SCJNWO3OaAvO36kaora11hiWm9x oTag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=IkTC3qdnwxIFqch5yLRe8frKfvV4jXfufWZ3gU6h44k=; b=SVmCLzyEQD7nIijNxX4aAhE++2A31ZdiWeff/PeiFLADbyWZr3P4qdanYugUjWkxoR Ap/8P9YUqkWMt58RLPOzF83tMYenji0MDOHCj408n/LJkS9+F8aZKT1lAL3CAYt/vhFr SwhyzpcMLLvDPsgurVQo8iCAGmlo0E0taToJ425uHnbUieJ2gQIhbsbj7rPu6hcYYjPy oyXFHH/YdGJEDvGLn6IBEPOAJdQ4fn+o53D8cUZjDehnw9PELAyiL8DNsS9NynK/irVG 3TIWpw34edqJwXgCyOPCjxrRUHjySZeeREH2TWAazA2ZjTj+woia8uN7M1lcLGnE2QWq ojow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=gG3XT5QR; 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 o1si1981529pga.523.2018.04.18.17.42.47; Wed, 18 Apr 2018 17:43:01 -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=@yahoo.com header.s=s2048 header.b=gG3XT5QR; 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 S1753180AbeDSAlm (ORCPT + 99 others); Wed, 18 Apr 2018 20:41:42 -0400 Received: from sonic314-20.consmr.mail.bf2.yahoo.com ([74.6.132.194]:35045 "EHLO sonic314-20.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752696AbeDSAlk (ORCPT ); Wed, 18 Apr 2018 20:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1524098500; bh=IkTC3qdnwxIFqch5yLRe8frKfvV4jXfufWZ3gU6h44k=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=gG3XT5QRvEqRJErFfFpHu4fN7bWdLWDk67onweW58AJoYS+9+BvZDtaiDfxXwPFqZxKbhG7U8ZvSHBUB5ycHJnDdmqXr6xDOKko/G8TUTaHP5ka0KxUuFwJ+npLFLye2E2kglqdd7sH4i2YsNwB4IR7HJpTd52SBO1ivHnS0lBDoNZ1yM5CQ5oXGhVsbBEQb4o3a961rlSsd9WCkjfnUiMlTnQKSzHTw96OlsmStG3HZqrJkxsVmQAItlQlfuI7dUPXF20zKWKRpsm57IipwZBuNy5fzpjgSRUJwmU0PSbc1WnmdVtoCrmaLWhoHnXNat9CYMmfSgv2PhF5bVjdHOA== X-YMail-OSG: YNypZAMVM1l52JEe.RpRLEVlGeCZ0hGU.WqV0uDDLL3DrAu5qlrvH7XALmThr8l 00_KA4lBSWFhIQiZ1YUbe2NpMpjtE8HRoljGaQ2aCl9IYnn5j.lQw_FeR7ioS5nJdApyjPspDb.Z eXlmKzh671B2s3nU0EKvxVD9jX91HPIm0SzpWskeerXVstL2Bk6A1pTaXQ5KrB8FtDA1.HUfg5Rs c0jHmd08aNIdA2LmSiO3.hTn.7nqoifjDH3GpRtrO80Ewd4PgIM526m3SY064wmPxDGYGDSkJ4Qk y2E8LWB4waCFSD3nqAD7FQ2aYD66bosIHhAf7SDYwYuJfV8gol5HXsJOayjwoMF_gioYYdVipXZ9 anqQOQBtuSjPLzHqrpZHpEx5er7yydEUp_m_iqQoOAkhzIc9t9r4Vpl_maSm_fnyM8k7.DaiheEm c4uTl3hIusGIf2JuKtszqyREicO0zNn4VowsRpGqBGaeu1_To90vJKv1wrE.DHyQAbpBWJd1vGoO voTXNxxmbg_K4I.RC_sQ_EK70TeeElqXg4qOEmyo6M7Moop3e8Z3Blc3dR94F3Uy5zB1fkGrrjHb QH1NH09FOB8X3PwLS5a9f Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.bf2.yahoo.com with HTTP; Thu, 19 Apr 2018 00:41:40 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.105]) ([67.169.65.224]) by smtp407.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 38bfa78a714ecca0b08add5f63a74171; Thu, 19 Apr 2018 00:41:35 +0000 (UTC) Subject: Re: [RFC PATCH ghak32 V2 01/13] audit: add container id To: Paul Moore , Richard Guy Briggs Cc: cgroups@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, LKML , netdev@vger.kernel.org, ebiederm@xmission.com, luto@kernel.org, jlayton@redhat.com, carlos@redhat.com, dhowells@redhat.com, viro@zeniv.linux.org.uk, simo@redhat.com, Eric Paris , serge@hallyn.com References: From: Casey Schaufler Message-ID: <32d3e7a6-36f0-571a-bb91-67f746c7eafa@schaufler-ca.com> Date: Wed, 18 Apr 2018 17:41:29 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/18/2018 4:47 PM, Paul Moore wrote: > On Fri, Mar 16, 2018 at 5:00 AM, Richard Guy Briggs wrote: >> Implement the proc fs write to set the audit container ID of a process, >> emitting an AUDIT_CONTAINER record to document the event. >> ... >> >> diff --git a/include/linux/sched.h b/include/linux/sched.h >> index d258826..1b82191 100644 >> --- a/include/linux/sched.h >> +++ b/include/linux/sched.h >> @@ -796,6 +796,7 @@ struct task_struct { >> #ifdef CONFIG_AUDITSYSCALL >> kuid_t loginuid; >> unsigned int sessionid; >> + u64 containerid; > This one line addition to the task_struct scares me the most of > anything in this patchset. Why? It's a field named "containerid" in > a perhaps one of the most widely used core kernel structures; the > possibilities for abuse are endless, and it's foolish to think we > would ever be able to adequately police this. If we can get the LSM infrastructure managed task blobs from module stacking in ahead of this we could create a trivial security module to manage this. It's not as if there aren't all sorts of interactions between security modules and the audit system already.