Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753192AbbG1QLJ (ORCPT ); Tue, 28 Jul 2015 12:11:09 -0400 Received: from smtp104.biz.mail.bf1.yahoo.com ([98.139.221.63]:48080 "EHLO smtp104.biz.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbbG1QLF (ORCPT ); Tue, 28 Jul 2015 12:11:05 -0400 X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: KaW7.TIVM1n1jzLQwPlXMKCjsf4URqQoQI5fYoNty5oKwIr 4zG_qUZAJ8zd5zqEhwPgGR9kH13TfeAKNgfUlPwqsmphT18BLlMDTAUKri77 eH.am9fGuk5bTRT.7LUGbs2YkWDmLOVWg0ysMxEToaJiSGeiK1ZzcQbsilAo 26cZQAdt57eW20c4oYDeOiKBaoNyJniLBu3gkvmgWaJX26LGwgLLcvXAKFN1 x3mWhCBE5.KBr9XBgw0pExhKHVN10WyIKBvPvTDliFj8PEqgSnUw0Ud2x6LC 3uJd5uz_i9TkX2Sa12XjjWANsYpAyArPBfEOQKmVL4Bec7cU3jx.od8pKPzM m3Uz_7vCuA8j_1b8IRrCjAhohxTd0QpcuMsJnDiRjhgPtcpLTXCO8VPcwGbl MEDrgv4CogBt.39hOVqrjf49tEiDgCqr8ED26XOeNo4nkEefuFpDkYVFJeOa iPCS2yRTLvPnmgPGwIKKoPxHCIbDNKmeINF6RagBmyTSgs6DS2vk7OLeZ7qD 6nbKBLx7SN4AuzAB3aIHJiPIUX4.0q2K6rQ68XBRX2Q-- X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: Re: [PATCH] Smack: replace capable() with ns_capable() To: "Serge E. Hallyn" References: <1437737174-29451-1-git-send-email-sungbae.yoo@samsung.com> <1437738032.2190.2.camel@samsung.com> <000001d0c80b$55bdec50$0139c4f0$@samsung.com> <55B7936E.2080007@schaufler-ca.com> <20150728150636.GA1656@mail.hallyn.com> Cc: Sungbae Yoo , "'Lukasz Pawelczyk'" , "'James Morris'" , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Casey Schaufler From: Casey Schaufler Message-ID: <55B7A996.8010704@schaufler-ca.com> Date: Tue, 28 Jul 2015 09:11:02 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150728150636.GA1656@mail.hallyn.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1238 Lines: 28 On 7/28/2015 8:06 AM, Serge E. Hallyn wrote: > On Tue, Jul 28, 2015 at 07:36:30AM -0700, Casey Schaufler wrote: >> On 7/26/2015 6:27 PM, Sungbae Yoo wrote: >>> So, Do you agree to allow the process to change its own labels? >> No. This requires CAP_MAC_ADMIN. Smack is mandatory access control. >> Being in a namespace (as they are implemented today) is not sufficient. > "requires CAP_MAC_ADMIN" should probably read "requires > CAP_MAC_ADMIN against initial user namespace." Any unprivileged > user can unshare a user_ns and get CAP_MAC_ADMIN. As you say. Since the inode's xattrs are common you need privilege relative to the initial namespace. > > I'm terribly sorry I'm not yet caught up on the smack-lsm thread. > But intuitively I'd think that you'd want a way for smack policy > to say "this label is allowed to create a user-ns which will be > allowed to CAP_MAC_ADMIN", so then smack_capable() can use that > information to cleanly deny CAP_MAC_ADMIN in namespaces. > > -serge > -- 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/