Return-Path: Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:41070 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbcH0Lww (ORCPT ); Sat, 27 Aug 2016 07:52:52 -0400 Date: Sat, 27 Aug 2016 12:52:30 +0100 From: One Thousand Gnomes To: James Bottomley Cc: Florian Weimer , Josh Max , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, "Carlos O'Donell" Subject: Re: [PATCH] binfmt_misc: allow selecting the interpreter based on xattr keywords Message-ID: <20160827125230.25b9d3e1@lxorguk.ukuu.org.uk> In-Reply-To: <1472246778.5189.90.camel@HansenPartnership.com> References: <1471838494-29672-1-git-send-email-JMax@mail.greenriver.edu> <1472141735.3489.5.camel@HansenPartnership.com> <9856acd1-cab7-2691-1c89-279fbfe53e19@redhat.com> <20160826221207.72a3ae99@lxorguk.ukuu.org.uk> <1472246778.5189.90.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 26 Aug 2016 17:26:18 -0400 James Bottomley wrote: > On Fri, 2016-08-26 at 22:12 +0100, One Thousand Gnomes wrote: > > > A non-security use case would be to run the binary (without > > > modification) with a different ELF interpreter (assuming this > > > allows to override binfmt_elf, but self-sandboxing would need that > > > as well). This would make it easier to use older or newer libcs > > > for select binaries on the system. Right now, one has to write > > > wrappers for that, and the explicit dynamic linker invocation is > > > not completely transparent to the application. > > > > If it gets in I'll be using it to label CP/M COM files so that they > > can be auto-run nicely when crossbuilding stuff in part with the > > original tools but a modern build environment 8) > > > > Sandboxing is an obvious use but there are more bizarre ones such as > > marking a file system image to get auto-run under a virtual machine > > or make containers fire up as if they were commands. > > So I asked previously but didn't get an answer. If this is useful for > sandboxing and being in the sandbox depends on the xattr value, > shouldn't it be in one of the privileged xattr namespaces, not the > user. one? IMHO no - because it's not giving additional rights, it is taking rights away voluntarily - because as a user I can simply cp the file to get an unsandboxed version If it was a setuid like bit then yes it would matter. Alan