Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp954017ybm; Wed, 27 May 2020 12:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykAw25gddaOVAD/rhMdPPhTFv+L24mVlQ0B8mXuYt1Qbzsy7uir17F8EFvqBvjUTOpR5wN X-Received: by 2002:a50:a981:: with SMTP id n1mr2699183edc.377.1590606277547; Wed, 27 May 2020 12:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590606277; cv=none; d=google.com; s=arc-20160816; b=iA/sCV68tC23fPQaWF8BULjq7QNnR3dzg3+PI57XZJhWZsGEzPKbTWvgAmFJj1ayca 9+X0QxuaiadqRUBe/XLvUqN9ZAsoIPWpiUBX7Xe2O1/xmCqusUB72+byjVxvIr2/nQiA cgRHPIurtKkmPqwIAltXmSXC4njIag0OYWPIgfY2XuYFFktCe2EhyJrow1VqGml9Dpen xYIMzVuKwTkHtMIBD5C7qDInbI2XsIEESB/cvUvwKxDXM9qvT8imytVawKBcwA/2aUIQ GkT+qKxY313PkuiAby9O2cq6PuANBZneAbjGSqRZe1S43ayZ1ORQzVc+JynyLJow1xs4 cR+Q== 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:autocrypt:from:references:cc:to:subject:dkim-signature; bh=aS82V6kxKg54XgsMZiRIuOGcGsquTWw+tog/a3lXb5c=; b=R5ZCblJLacyg4KoAVIZnW12sF9tdocNMltw/w9v4UKX0GZN0q4HIw38zB2GjxHNV9T Tos37+bZtSUALkb82/UkeDlQNhd0Hd/1OlIZJqSQRTOVhv/A5PK4m5Kw+6iExa7LQLug IsVnoq0DQv8OXVhfsScKsczE528w+qnGaY8MOIj5eZz9zcUMH6odU9aVRvKFXWNSRjrX npSO5RIKzlH1P1q1C5aZ4pfitBOyrJaHTUjYO7kQItk9UsgySCIixWGR15FJ7W2nDuvu tuhc/AonhNmcO1c1a7e+5V94+dBa5aqmeCbAEzzzPuQn3NSth4eyffirk+yu8J/X11X3 cNxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=SBiTn4kN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y21si2272226edt.501.2020.05.27.12.04.13; Wed, 27 May 2020 12:04:37 -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=@yahoo.com header.s=s2048 header.b=SBiTn4kN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730891AbgE0P5P (ORCPT + 98 others); Wed, 27 May 2020 11:57:15 -0400 Received: from sonic316-26.consmr.mail.ne1.yahoo.com ([66.163.187.152]:45818 "EHLO sonic316-26.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730907AbgE0P5L (ORCPT ); Wed, 27 May 2020 11:57:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1590595030; bh=aS82V6kxKg54XgsMZiRIuOGcGsquTWw+tog/a3lXb5c=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=SBiTn4kNP7DLsMxceH9sA0CL1+UhjbyDE02A7hmOqT2N3/rNDAISuE2sBekkMAfmdNg/rNr2JXPQkV+jinN3sE46IpUOOX7YYcoXZBf3dS6MeF3OmLius2T+Lmxcnts7jK08x7VXzfZjIo6xUeiamFABsn7zh0hYO3o0ihHAnDY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CdIetzOcDclfBxw3munQbju h.TXAr.DwBs67fX.i69T8v2RoELBXHdmgSBE.d9eY6FXf3Lx.oE1v0ZKU9bfBwvsz_axQI7oNA9u xhBWENvaMEYZqoGlROmCKVUy16ZNsbxVv7MMbUZwxPPQMAV1OgFwxJNIhGHpoHUmSWrAcUNG2FRE cPpckBJmq_PtBuDaat5CaEZeo6wNA01POAvIQvYmHmuHX6bBlR7dBROy9OS6wMNccWFSj092Bq2c 66L4npDH40vmzy60K5GZXW_Mqe3Hx36mWs_j7My7fSFJBBrYMY.tXSsN4xObI9uHanE8gApDxvdH YIkjALR9p6znZvkq6VRClpN0lSBMTty1FNFfo76.OhSqm63aNkGi2d_lgW_tSGG67UoGDCJC8TGG LhJhd.PGdcK02YdAIHZ8faka5YILV1ouYrL7VGnykUl_WBh1QLblWbT9Ac1b8jvyM72_3M8bj4L6 WSqTItFYQqVowRocz6fkZyUUT6czFhPXDl_lYkYVwCHYxk1tSq4WxuvFLFGTPbDHazDJEkJnp_Xn aMdGw9dMwk0w3Vs5K9Q-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Wed, 27 May 2020 15:57:10 +0000 Received: by smtp404.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b498316bc3c2f4687f9c4237971a7493; Wed, 27 May 2020 15:57:06 +0000 (UTC) Subject: Re: [PATCH] capabilities: Introduce CAP_RESTORE To: Adrian Reber Cc: Christian Brauner , Eric Biederman , Pavel Emelyanov , Oleg Nesterov , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Nicolas Viennot , =?UTF-8?B?TWljaGHFgiBDxYJhcGnFhHNraQ==?= , Kamil Yurtsever , Dirk Petersen , Christine Flood , Mike Rapoport , Radostin Stoyanov , Cyrill Gorcunov , Serge Hallyn , Stephen Smalley , Sargun Dhillon , Arnd Bergmann , Aaron Goidel , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, selinux@vger.kernel.org, Eric Paris , Jann Horn , Casey Schaufler References: <20200522055350.806609-1-areber@redhat.com> <20200525080541.GF104922@dcbz.redhat.com> <20200527134842.GA250149@dcbz.redhat.com> From: Casey Schaufler Autocrypt: addr=casey@schaufler-ca.com; keydata= mQINBFzV9HABEAC/mmv3jeJyF7lR7QhILYg1+PeBLIMZv7KCzBSc/4ZZipoWdmr77Lel/RxQ 1PrNx0UaM5r6Hj9lJmJ9eg4s/TUBSP67mTx+tsZ1RhG78/WFf9aBe8MSXxY5cu7IUwo0J/CG vdSqACKyYPV5eoTJmnMxalu8/oVUHyPnKF3eMGgE0mKOFBUMsb2pLS/enE4QyxhcZ26jeeS6 3BaqDl1aTXGowM5BHyn7s9LEU38x/y2ffdqBjd3au2YOlvZ+XUkzoclSVfSR29bomZVVyhMB h1jTmX4Ac9QjpwsxihT8KNGvOM5CeCjQyWcW/g8LfWTzOVF9lzbx6IfEZDDoDem4+ZiPsAXC SWKBKil3npdbgb8MARPes2DpuhVm8yfkJEQQmuLYv8GPiJbwHQVLZGQAPBZSAc7IidD2zbf9 XAw1/SJGe1poxOMfuSBsfKxv9ba2i8hUR+PH7gWwkMQaQ97B1yXYxVEkpG8Y4MfE5Vd3bjJU kvQ/tOBUCw5zwyIRC9+7zr1zYi/3hk+OG8OryZ5kpILBNCo+aePeAJ44znrySarUqS69tuXd a3lMPHUJJpUpIwSKQ5UuYYkWlWwENEWSefpakFAIwY4YIBkzoJ/t+XJHE1HTaJnRk6SWpeDf CreF3+LouP4njyeLEjVIMzaEpwROsw++BX5i5vTXJB+4UApTAQARAQABtChDYXNleSBTY2hh dWZsZXIgPGNhc2V5QHNjaGF1Zmxlci1jYS5jb20+iQJUBBMBCAA+FiEEC+9tH1YyUwIQzUIe OKUVfIxDyBEFAlzV9HACGwMFCRLMAwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQOKUV fIxDyBG6ag/6AiRl8yof47YOEVHlrmewbpnlBTaYNfJ5cZflNRKRX6t4bp1B2YV1whl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agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200527134842.GA250149@dcbz.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Mailer: WebService/1.1.15959 hermes_yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.6) Content-Length: 2253 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/27/2020 6:48 AM, Adrian Reber wrote: > On Mon, May 25, 2020 at 11:55:20AM -0700, Casey Schaufler wrote: >> On 5/25/2020 1:05 AM, Adrian Reber wrote: >>> On Fri, May 22, 2020 at 09:40:37AM -0700, Casey Schaufler wrote: >>>> On 5/21/2020 10:53 PM, Adrian Reber wrote: >>>>> This enables CRIU to checkpoint and restore a process as non-root. >>>> I know it sounds pedantic, but could you spell out CRIU once? >>>> While I know that everyone who cares either knows or can guess >>>> what you're talking about, it may be a mystery to some of the >>>> newer kernel developers. >>> Sure. CRIU - Checkpoint/Restore In Userspace. >> Thanks. I blew out my acronym processor in the 1990's while >> working on trusted Unix system security evaluations. >> >>>>> Over the last years CRIU upstream has been asked a couple of time i= f it >>>>> is possible to checkpoint and restore a process as non-root. The an= swer >>>>> usually was: 'almost'. >>>>> >>>>> The main blocker to restore a process was that selecting the PID of= the >>>>> restored process, which is necessary for CRIU, is guarded by CAP_SY= S_ADMIN. >>>> What are the other blockers? Are you going to suggest additional new= >>>> capabilities to clear them? >>> As mentioned somewhere else access to /proc//map_files/ would be= >>> helpful. Right now I am testing with a JVM and it works without root >>> just with the attached patch. Without access to /proc//map_files= / >>> not everything CRIU can do will actually work, but we are a lot close= r >>> to what our users have been asking for. >> Are you talking about read access to map_files owned by other users >> or write access to map_files for the current user? > If I understand part of CRIU correctly, then we only need read-access > for the current user. I am sure Andrei, Pavel or Cyrill will correct me= > if I am wrong concerning map_files. If I do "ls -l /proc/self/map_files" I get the link name and link content= =2E While I can't open /proc/self/map_files/7fbde0c3200-7fbde0c3300 I can rea= d that it points to /usr/lib64/ld-2.30.so, which is something I can open=20 and read. Sure, it's an extra step, but it's no big deal. It does raise t= he question of what value comes from disallowing open via the symlink.