Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758185AbbGQNWy (ORCPT ); Fri, 17 Jul 2015 09:22:54 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:35050 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756971AbbGQNWw (ORCPT ); Fri, 17 Jul 2015 09:22:52 -0400 Date: Fri, 17 Jul 2015 08:21:46 -0500 From: Seth Forshee To: Casey Schaufler Cc: "Eric W. Biederman" , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, Serge Hallyn , Andy Lutomirski , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] Initial support for user namespace owned mounts Message-ID: <20150717132146.GA65566@ubuntu-hedt> References: <1436989569-69582-1-git-send-email-seth.forshee@canonical.com> <87615k7pyu.fsf@x220.int.ebiederm.org> <20150716135947.GC77715@ubuntu-hedt> <55A7C920.7090206@schaufler-ca.com> <20150716185750.GB51751@ubuntu-hedt> <55A8253E.3000407@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55A8253E.3000407@schaufler-ca.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3169 Lines: 71 On Thu, Jul 16, 2015 at 02:42:22PM -0700, Casey Schaufler wrote: > > I welcome feedback about anything I've missed, but stating generally > > that you think I probably missed something isn't very helpful. > > True enough. I hope I've explained myself above. Thanks, that definitely clarified where we were having a disconnect. Andy's done a fantastic job explaining how those concerns are addressed. > > The LSM issue is thornier than the rest of it though, which is why I > > specifically asked for review there in the cover letter. There's a lot > > of complexity and nuance, and I still don't have a grasp on all the > > subtleties. One such subtlety is the full impact of simply ignoring the > > security labels on disk (but I am still confused as to why this is > > different from filesystems which don't support xattrs at all). > > If you can mount a filesystem such that the labels are ignored you > are effectively specifying that the Smack label on the files be > determined by the defaulting rules. With CAP_MAC_ADMIN that's fine. > Without it, it's not. > > > I was unaware of Lukasz's patches until yesterday, and I will have a > > look at them. But since we don't have the LSM support for user > > namespaces yet, I don't see the problem with doing something safe for > > LSMs initially and evolving the LSM integration for user ns mounts along > > with the rest of the user ns integration. > > Ignoring the security attributes is not safe! Understood. It's surely safe for each LSM to deny such mounts until it has a way to handle them safely though. I'm not trying to completely punt on the issue of security modules, just break this down into more manageable chunks. You've given good guidance for Smack (thanks very much for that), so I can plan to work on that soon. > > Your point is taken about my less-than-expert opinion about the other > > security modules. We should at minimum get acks from the maintainers of > > those modules that unprivileged mounts will not compromise MAC. > > I am the Smack maintainer. Unprivileged mounts as you have > described them compromise MAC. They compromise DAC, too. It looks like Andy's more or less convinced you that DAC isn't (additionally?) compromised. And there's a plan for MAC, that the security module can deny mounts from user namespaces until it has a solution for allowing them safely. > > For Smack specifically, I believe my only concern was the SMACK64EXEC > > attribute, as all the other attributes only affected subjects' access to > > the files. So maybe it would be possible to simply ignore this attribute > > in unprivileged mounts and respect the others, even lacking more > > complete LSM support for user namespaces. > > SMACK64EXEC is analogous to the setuid bit, but I would rather see > exec() of programs with this attribute refused that for it to be > blindly ignored. That's fine, it's your call. Thanks, Seth -- 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/