Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2632956imb; Mon, 4 Mar 2019 09:59:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyoLHJC6RKp/y3Zg9y7a7rWuRY+su/Xm5alMPDJKHt3onjinH0yVX9yfA9yBhkeETyA1Wyb X-Received: by 2002:a63:b0b:: with SMTP id 11mr19760555pgl.187.1551722341054; Mon, 04 Mar 2019 09:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551722341; cv=none; d=google.com; s=arc-20160816; b=L5rAgK/dVvI6ZLVxrBEoV6mM6DPKbiGL8BeGIKeP0Q7xPI8AOb4caCv1vR44gY70Mr R08pn1qMhpzKUEforv5dsa3t7MgbEN/l2vi1PfpAieF9fIEVzWMNleptrOSF2YLErjQW XfSDhtZV+g6ropqJsospmBWHT3VxClZ3GxmNeEBmJ0Ok99TGNQ8vggRcXN2kCLqnNGrY zRjJ2MXK9dQN7rWv3yLa3br4WLVUFNKEg8jj3RQmHK/le1vRrnzxvyl2LI1QzfTNQgvN pjjL249zyknaM8Q4TXKSYUGdgFWNicYTGeHJlMTJZReQSpv5+lYoajPdlmbcV09BfXxk FfGQ== 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; bh=GC069wVlaL0TLFD227ZH92fWAUBkMXO4kaPfz/TDKoA=; b=LTHwH4fpDeNCshLgcjMQtPvq8IuXy5grXT3D7sOndNRjYuBks6DbqXiiSil9qF28GU dpr+4XH3Hv9CtueyZloPFGKnfNQZJ1weMQAC/ssdlZumXHvMi2dIkwpezkepxhbc/lBW s9dWtLKHK8rnZ1y9yUrocWfG73qqQIwxAAIbbt0MSu3Tvck6hpBvfCPQ6rgmn7WaloT7 WhWqxPfE0hdHAKhrqxEgSkBhDYw1uQZP2j0SBIAzeZW8t4S92WkSjGLwuzgU1I/wjA22 MfpSYKOZwDxfKbzyZ5YXLXnaRi7ADnHVfqHAHZjK9BQjzuQbtVsHWPJ6u7UtK/iRvDHK 6bCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=QXW8gE66; 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 u77si6267744pfj.139.2019.03.04.09.58.45; Mon, 04 Mar 2019 09:59:01 -0800 (PST) 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=QXW8gE66; 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 S1727535AbfCDR4v (ORCPT + 99 others); Mon, 4 Mar 2019 12:56:51 -0500 Received: from sonic316-26.consmr.mail.ne1.yahoo.com ([66.163.187.152]:32803 "EHLO sonic316-26.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbfCDR4v (ORCPT ); Mon, 4 Mar 2019 12:56:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1551722209; bh=GC069wVlaL0TLFD227ZH92fWAUBkMXO4kaPfz/TDKoA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=QXW8gE66dmMl1rt9zIM53upJKN7DUDLMsP+7982OQSYZNEJl1367SZR4UH7tUoW+DQaFHwuekES/w+M2FJCrvYgOSAd3bYVjuMjL3j0GdX2HV+x7AwFhoyMT2tcyrNvHEr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ubCb9sDAraIi7BqyX3R8.6K8WZgOYxDOx_.MYkJ Qn3OQGcmeKeHZ6RJZexFtI56.dUANGA_Mu77.nJj4MV0iccJ9mkWqX3UkE5yAVvOqgTL6Dm0f_ec CVXnoSQAeD8OI7d0APBrtvQ4dduWbjlWCVaqM4BAeop2Z8HupZ4GmqG9wBvjSg46bJF4Xa8C6qgy ijF5WZX6D6N2y75sH3k6ujADvdm9b6RryvoU1xHKNSfayltZAZ7gxFrzBbtw_FCar Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Mon, 4 Mar 2019 17:56:49 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.103]) ([67.169.65.224]) by smtp424.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID bed51b671e44fa380576cbee08ed0a10; Mon, 04 Mar 2019 17:56:48 +0000 (UTC) Subject: Re: overlayfs access checks on underlying layers To: Mark Salyzyn , Vivek Goyal , Miklos Szeredi Cc: Stephen Smalley , Ondrej Mosnacek , "J. Bruce Fields" , Paul Moore , linux-kernel@vger.kernel.org, overlayfs , linux-fsdevel@vger.kernel.org, selinux@vger.kernel.org, Daniel J Walsh , Linux Security Module list References: <20181127210542.GA2599@redhat.com> <20181128170302.GA12405@redhat.com> <377b7d4f-eb1d-c281-5c67-8ab6de77c881@tycho.nsa.gov> <26bce3be-49c2-cdd8-af03-1a78d0f268ae@tycho.nsa.gov> <20181129134943.GA16762@redhat.com> From: Casey Schaufler Message-ID: <6e31bc53-0a27-63d1-2d07-a403dfe36ce1@schaufler-ca.com> Date: Mon, 4 Mar 2019 09:56:48 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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 3/4/2019 9:01 AM, Mark Salyzyn wrote: Adding linux-security-module to the CC. Please keep the general LSM community in to loop. > On 11/29/2018 05:49 AM, Vivek Goyal wrote: >> So will override_creds=off solve the NFS issue also where all access >> will >> happen with the creds of task now? Though it will stil require more >> priviliges in task for other operations in overlay to succeed. > > NFS problems seems to have ended the discussion, too many > stakeholders? too many outstanding questions? > > Do we accept the limitations of the override_creds patch as is, and > then have the folks more familiar with the NFS scenario(s) build on it? > > [TL;DR] > > After looking at all this discussion, it feels like a larger audited > rewrite of the security model is in order and override_creds=off may > be a disservice (although expediently deals with Android's needs) to a > correct general solution. I admit I have little idea where to go from > here for a general solution. > > As far as I see it, the model of creator && caller credentials is a > problem for any non-overlapping (MAC) privilege models. This patch > allows one to drop any creator privilege escalation, re-introducing > the "caller" to the lower layers. > > As such I would expect a better model is to _always_ check the caller > credentials again in the lower layers, and only check the creator > credentials, some without caller credentials, for some special cases? > Change an && to an || for some of the checks? What are those special > cases? I must admit _none_ of those special cases need attention in > the Android usage models though making it difficult for me to do the > fight thing for the associated stakeholders. > > The lower privileged application access to the directory cache > inherited by other callers troubles me (not for Android, but in > general) and feels troublesome (flush out the directory cache? how to > tag the privileges associated with the current instance of the > directory cache?). Some operations (eg: delete a file for incoming, > create mknod in upperdir) are special cases requiring the checking of > caller credentaisl to function (not a problem for Android as the > caller that deletes a file just so happens to have the necessary > privileges). > > Also, mount namespaces (in upper, lower, etc), how will they affect > this all, is there a need for more attention to this as well? > > -- Mark >