Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754665AbbGPCy2 (ORCPT ); Wed, 15 Jul 2015 22:54:28 -0400 Received: from smtp104.biz.mail.bf1.yahoo.com ([98.139.221.63]:41471 "EHLO smtp104.biz.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbbGPCy0 (ORCPT ); Wed, 15 Jul 2015 22:54:26 -0400 X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: HsXcuQcVM1lVbdAZoUa9jaf.c2Fro3LzIVx8OnszxldlJMX TWfcDbDl_NEtdrfh_TlYK_j4T8eo3QfR81_TjqxjTLpiBiqkcPUpIOQBmqQm L.SlvmZqkC9Gu2STYoVZ6qWCkJ7kAUzsQidLayFbnhJCj4VLwZCyDPeSXJL1 ZuVgzRgcX8.eUAlydRTOVEMlw1i.zPQvUUiKobzs_PEUtqCZmsOAQr3PxDpC tAa3ImgvM5SLymBnS3D4W7TyTA73d1ZxIqrvnlwqyoACOdu5prMCmNkKca6w DMg6OWJM8y6uKDtEdTsVyeiPoKpseub29NXH8rVhMTwpiwDNrBTvIIXZCIBo LOPlvJNJExBKM7_b00.jj.X6pYjFgvbWPsF_sxf_pFlxNYbiL1wQbw8TjBw2 ehzA_PoKFd_Z.OW9.ojZ6A6qaetOlYmWSWO1uNmT01xbVgN0SV5ERdVLig6T yXu1aB9CsFCykGMZ6VpYcGaBpwwpEfvGZ1QcEsoIGdwe_AaEzW34QvyFm6F7 r_IQ4_QMZX.YJ1.gv4PVRIKwgUlGNmOJgGddRK0u4DNbW_RGOE0dQQuv4Lg4 - X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Message-ID: <55A71CE3.4050708@schaufler-ca.com> Date: Wed, 15 Jul 2015 19:54:27 -0700 From: Casey Schaufler User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Andy Lutomirski CC: "Eric W. Biederman" , Seth Forshee , Alexander Viro , Linux FS Devel , LSM List , SELinux-NSA , Serge Hallyn , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/7] Initial support for user namespace owned mounts References: <1436989569-69582-1-git-send-email-seth.forshee@canonical.com> <55A6C448.5050902@schaufler-ca.com> <87vbdlf7vo.fsf@x220.int.ebiederm.org> <55A6E107.3070200@schaufler-ca.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2220 Lines: 44 On 7/15/2015 6:08 PM, Andy Lutomirski wrote: > On Wed, Jul 15, 2015 at 3:39 PM, Casey Schaufler wrote: >> On 7/15/2015 2:06 PM, Eric W. Biederman wrote: >>> Casey Schaufler writes: >>> The first step needs to be not trusting those labels and treating such >>> filesystems as filesystems without label support. I hope that is Seth >>> has implemented. >> A filesystem with Smack labels gets mounted in a namespace. The labels >> are ignored. Instead, the filesystem defaults (potentially specified as >> mount options smackfsdef="something", but usually the floor label ("_")) >> are used, giving the user the ability to read everything and (usually) >> change nothing. This is both dangerous (unintended read access to files) >> and pointless (can't make changes). > I don't get it. > > If I mount an unprivileged filesystem, then either the contents were > put there *by me*, in which case letting me access them are fine, or > (with Seth's patches and then some) I control the backing store, in > which case I can do whatever I want regardless of what LSM thinks. > > So I don't see the problem. Why would Smack or any other LSM care at > all, unless it wants to prevent me from mounting the fs in the first > place? First off, I don't cotton to the notion that you should be able to mount filesystems without privilege. But it seems I'm being outvoted on that. I suspect that there are cases where it might be safe, but I can't think of one off the top of my head. If you do mount a filesystem it needs to behave according to the rules of the system. If you have a security module that uses attributes on the filesystem you can't ignore them just because it's "your data". Mandatory access control schemes, including Smack and SELinux don't give a fig about who you are. It's the label on the data and the process that matter. If "you" get to muck the labels up, you've broken the mandatory access control. > --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/