Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp607166ybx; Fri, 1 Nov 2019 08:25:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWBGM7P3vAaWL3sqB6wxu4ks4dK9WLoHPherDu/aNKOL+N3CXUVm1Q8syWMj/RuyMs6KZH X-Received: by 2002:a50:ac14:: with SMTP id v20mr13160727edc.291.1572621923985; Fri, 01 Nov 2019 08:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572621923; cv=none; d=google.com; s=arc-20160816; b=j1zE0JLM+GcxLVtFM1Y4NTfD9iLGTxIevOsW9Qygc7lYNWsb8MkcnBuOwX7L8DXqfr +Id7uwwc69dgXsigmTNV+4JF100pc1rqdap0c75Kc18ZMCS6kyLUMrKxAunzujn+dmlS Fs1YfagUUht4IbAznBPe940TI5IdXnZMgv25ZhIWpRqKtryCnnyIJ1jmXxSVhqtt7hgX fY9eFqp7HHDbJMQf/0W8flcqg8AJpJnNghKVHXjx1AA4GytBlHpRjUwHnBlSK1Zy+GRc MOlywdtnGuEi2gnUWUkQe98UEkd0D3Cbbyov1E79L/6WfFQQDraI+3ypPLNE/rBc4EVR vo6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WDYGxxA/KgrYN0QEUL49MfltlmEWA16vt4MxjEs1+6E=; b=fv0+EvHAea91QXNerwzI7iKgWivrefMfipx9CzGKFudFN2cOoRQGqmfsaFLpx6aIXu Irx7MEmvsx5dzWwFs8gdF11Vc7KpcMrKm4p53DL2rQP08Q92It95A2UGuw7tJpQhUcIs gKZboTRyBoqITJuyZpKoV9ssrajsTtSVWrRsxgL8XHiqVxYNCMqiGcptavLncRzL96eg Z7xirDjyBoEARn/ReJYkSM2Vzz2wa1SlfZR7eWzuO135HsSBMQQS922hLpdZhIXA5qn/ jlP9JyoQVUkj7UtjcML+hSQBczk+SYXF+jLWVv7Zmb+1EfA0lyfRDDoAhwxzIV6CJt4q vB2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZvFQruI8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si4973175ejr.106.2019.11.01.08.24.59; Fri, 01 Nov 2019 08:25:23 -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=@redhat.com header.s=mimecast20190719 header.b=ZvFQruI8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728668AbfKAPVl (ORCPT + 99 others); Fri, 1 Nov 2019 11:21:41 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35080 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728449AbfKAPVk (ORCPT ); Fri, 1 Nov 2019 11:21:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572621699; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WDYGxxA/KgrYN0QEUL49MfltlmEWA16vt4MxjEs1+6E=; b=ZvFQruI8L0LIc8Abg9nge7/YYc2CgXmrxcQ0E2Arp63U/CUqj+BsVzHQAr6GB4JTyCldVV j4MKTv9MX0U/UDN0bU8JLz8ghEDVYN+Ur2jmwn+B/N3pHiKsNYeOESlaCrzAp+Tcfbv0ra e8gHd21V2VgXboUFC5QAXvJTsP042Cw= 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-253-i5RvBvQWOlyITqFctoslYg-1; Fri, 01 Nov 2019 11:21:33 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4EE31005500; Fri, 1 Nov 2019 15:21:31 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-19.phx2.redhat.com [10.3.112.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82BD619C58; Fri, 1 Nov 2019 15:21:21 +0000 (UTC) Date: Fri, 1 Nov 2019 11:21:18 -0400 From: Richard Guy Briggs To: Steve Grubb Cc: nhorman@tuxdriver.com, linux-api@vger.kernel.org, containers@lists.linux-foundation.org, LKML , dhowells@redhat.com, Linux-Audit Mailing List , 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 V7 20/21] audit: add capcontid to set contid outside init_user_ns Message-ID: <20191101152118.mi2svoringtrdskv@madcap2.tricolour.ca> References: <3677995.NTHC7m0fHc@x2> <20191101150927.c5sf3n5ezfg2eano@madcap2.tricolour.ca> <1592218.lpl3eoh2c6@x2> MIME-Version: 1.0 In-Reply-To: <1592218.lpl3eoh2c6@x2> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: i5RvBvQWOlyITqFctoslYg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-11-01 11:13, Steve Grubb wrote: > On Friday, November 1, 2019 11:09:27 AM EDT Richard Guy Briggs wrote: > > On 2019-10-31 10:50, Steve Grubb wrote: > > > Hello, > > >=20 > > > TLDR; I see a lot of benefit to switching away from procfs for setti= ng > > > auid & sessionid. > > >=20 > > > On Wednesday, October 30, 2019 6:03:20 PM EDT Richard Guy Briggs wrot= e: > > > > > Also, for the record, removing the audit loginuid from procfs is = not > > > > > something to take lightly, if at all; like it or not, it's part o= f > > > > > the > > > > > kernel API. > > >=20 > > > It can also be used by tools to iterate processes related to one user= or > > > session. I use this in my Intrusion Prevention System which will land= in > > > audit user space at some point in the future. > > >=20 > > > > Oh, I'm quite aware of how important this change is and it was > > > > discussed > > > > with Steve Grubb who saw the concern and value of considering such = a > > > > disruptive change. > > >=20 > > > Actually, I advocated for syscall. I think the gist of Eric's idea wa= s > > > that / proc is the intersection of many nasty problems. By relying on > > > it, you can't simplify the API to reduce the complexity. Almost no > > > program actually needs access to /proc. ps does. But almost everythin= g > > > else is happy without it. For example, when you setup chroot jails, y= ou > > > may have to add /dev/random or / dev/null, but almost never /proc. Wh= at > > > does force you to add /proc is any entry point daemon like sshd becau= se > > > it needs to set the loginuid. If we switch away from /proc, then sshd= or > > > crond will no longer /require/ procfs to be available which again > > > simplifies the system design. > > >=20 > > > > Removing proc support for auid/ses would be a > > > > long-term deprecation if accepted. > > >=20 > > > It might need to just be turned into readonly for a while. But then > > > again, > > > perhaps auid and session should be part of /proc//status? Maybe = this > > > can be done independently and ahead of the container work so there is= a > > > migration path for things that read auid or session. TBH, maybe this > > > should have been done from the beginning. > >=20 > > How about making loginuid/contid/capcontid writable only via netlink bu= t > > still provide the /proc interface for reading? Deprecation of proc can > > be left as a decision for later. This way sshd/crond/getty don't need > > /proc, but the info is still there for tools that want to read it. >=20 > This also sounds good to me. But I still think loginuid and audit session= id=20 > should get written in /proc//status so that all process information = is=20 > consolidated in one place. I don't have a problem adding auid/sessionid to /proc//status with other related information, but it is disruptive to deprecate the existing interface which could be a seperate step. > -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