Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp960401ybm; Wed, 27 May 2020 12:14:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY8+m0r0s1FVxxD6i07sFv5W+RZiR2lZnbxoH2g++cjbRaPNSZODB0IQscugnRgMYZFUSw X-Received: by 2002:a05:6402:8c1:: with SMTP id d1mr25686531edz.265.1590606861521; Wed, 27 May 2020 12:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590606861; cv=none; d=google.com; s=arc-20160816; b=mXLDMLSnWOV8S34/9W14BNSNqN2CuteDTxsdFIuo3fOSUKOoYEfXZiHeYtUYaEIum3 DRNt/StTUCkAtRfqrzdGQOxHBNyFGGwMrl678hidUjT1l0/U1xyHctJEi4Wfu0SjCRuS U11gxPY5NRqiGNV0BUMQmcaf8JSJk9HUQT123j8K3GDY7jEnkN4IFrdk+lJ6PCDFS/FD 8HnCxjIVrd3UAsy3AGXJHqE2Rs1cvhMtAfnbVwZLB9iQ6djf6xr4lyLWA9Qm9Ne5B+Kg Z/gtdhpAHFPMw6UyXAfkjk6zqloBL6H2h1YExJbnJRD5ncETGycKV4ncyFiDYXgJxVQp EbOg== 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=4RUKhG0MsorRuTFWk3IKXk7iyxpxqMUqyq1xoFppTaw=; b=Xvj1IyNw2iQDkrv+v+l6CY6uAc+FQLPSs/ijAZTrTxgFTLkEZfS061pWR3Aau3WdXm kmpj/8cN0ZkmHN6SzioIrJcprG5sW3ERRVspZgSIu2FA4mNVhQrr24U5AvbIcWh2bNzf OnpSRLdxzrH2D0Xc4Eo/0+peE7aD4SquMlxuCZ4YBmLcHzla86vbO20fLLFSHmOin0OA 3eVASjLg95iDCoURXUfyU8ge4BL5TdAyctDytcVCvZ6KHCwsVD7V2o7gTL79R7v9Lyzd fqKxUSr1CGDcnrRmrAvo6akI2G05Lo8wA47/TELlKGMtJTkzoodRMZ7U5gmlLG+usSDA 5Jog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=XV2h4N9q; 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 k14si2494451ejz.419.2020.05.27.12.13.58; Wed, 27 May 2020 12:14:21 -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=XV2h4N9q; 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 S2391478AbgE0QqF (ORCPT + 98 others); Wed, 27 May 2020 12:46:05 -0400 Received: from sonic307-15.consmr.mail.ne1.yahoo.com ([66.163.190.38]:35709 "EHLO sonic307-15.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388333AbgE0QqE (ORCPT ); Wed, 27 May 2020 12:46:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1590597963; bh=4RUKhG0MsorRuTFWk3IKXk7iyxpxqMUqyq1xoFppTaw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=XV2h4N9q2trocfRvbMfbAm47mC6BlnPWOOYiCSThd6X1U1nY6oR6RPbhbp8ZAJe/XTaoH1//U/5hw2tqznUi69FVOs82ikDMiOggV+jPFoNE89yy7TH4kiWyrNa1vJ1olTPsPiuKf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Ln0b759PMMoYyvV5cXf91qw4caiVu4JshAF8SDqCKSlsSGE mNl0S92k1lEj3TJbMAK.cOGswgyCZhNuKIcYTFvA7Nix0bkQgvkq6dCor6dlBJXZNPpCDFdT4PPc .WQ_g3ABtWj4HTc_guS_AgXgqm9clpWUSCz1q_4C_nEeo9Ic1OklGQWd5OIKerEJYwmLARbpjRbP RsWIa1FbmH_h2VvuNoy.Cb21URXG_J0CnW79gyDUHquOMcJNZJLMRkNVcIzAgjrjAkD7XA7Thr5E gZeqG9OAfF35nyVqXKglOtPiOZuznMUawsolcOYSHicDnyOlEOuCNIHQLEaOm6v23VFrwutMSjkD Yh1F1n6ofvnJ4SnOKzMOinXbU_WsnIwusWJ6A0.Hd_hCqXVL8OleQ9oVeo9C2MGoL2P4ii2FPJEY uI6wNvHnwyXgEqhsjpcoi2gdghsRiw0x.8dxVXhgUZZpvw7xzbmyLS1PC0buX38ZHFWiBRdVuB.O 3_0EA5o_nayTilzjgmUKMTWMU0UDJ2Lps.8xgYHx3tp_KKuZShVVz_sTJAorbiDJ87AZxm41UZTM CXnwxQ_BcTAQCi8zAyfmhmii1rodpPhKgjw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Wed, 27 May 2020 16:46:03 +0000 Received: by smtp419.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b0e54431ea93744bec34cb09feee7ca8; Wed, 27 May 2020 16:46:02 +0000 (UTC) Subject: Re: [PATCH] capabilities: Introduce CAP_RESTORE To: Nicolas Viennot , Adrian Reber Cc: Christian Brauner , Eric Biederman , Pavel Emelyanov , Oleg Nesterov , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , =?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 fIxDyBG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0TiAVH5ZuPxyz6 abzjfg== Message-ID: <518a910c-b526-b7aa-f9f1-ddccb992954f@schaufler-ca.com> Date: Wed, 27 May 2020 09:46:00 -0700 User-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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Mailer: WebService/1.1.15959 hermes_yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.6) Content-Length: 839 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/27/2020 9:37 AM, Nicolas Viennot wrote: >>> 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. >> While I can't open /proc/self/map_files/7fbde0c3200-7fbde0c3300 I can read that it points to /usr/lib64/ld-2.30.so, which is something I can open and read. Sure, it's an extra step, but it's no big deal. It does raise the question of what value comes from disallowing open via the symlink. > Reading the symlink doesn't work in two cases: > 1) The file has been deleted In which case you won't be able to read it directly from the symlink, either. > 2) The file is a memfd file Ditto? Or is there some other problem?