Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp190061imm; Mon, 1 Oct 2018 08:29:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV63+SyBGSo8m9A9znL5WU43usOTTez3WXHqKtYxoSJiKZ/0XUVDtGdqtLuF4/iar4VeGhHDH X-Received: by 2002:a63:de05:: with SMTP id f5-v6mr10761344pgg.292.1538407743104; Mon, 01 Oct 2018 08:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538407743; cv=none; d=google.com; s=arc-20160816; b=aYwSlD8ChDs74SBRnTkkhDqw8EGxRy/LDPj9Kr9VsLcpRQ6UwwjQbodeW6p7h0EBNf E35HGqbfAsZWylBjTABpd67Ql30zvYZk7iLrWqfxl6NpqKBxCQj1ZB6y+gtkuFSuPlzX zft7HlTOaBoaJ+XV+FGng5QWMGS9xaLf6KWw0MUhBLIhGtWGp1IU1TI1Wkb7d155sJot LjLgBHoIkKhR90BVH8edELhO7s9wx9UNNte42V5W3PXFyEkffNFJqC1O6wcuX0IkxFdM b3zO8EzrUSHF7r+rGThyVdzOcszp1Hu/Ndl6vnwvow0jdRytKvKq+isIH1yUF6Mzm8J6 /Yzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=56VrLbx0piItw7J2oVlCKP4F9OkbDP2PXVchbORTtEY=; b=Y84NJmv6Fa051cjwkMMp4pUP4k2TpHICmRPzN0hJRb3lH60gDDFfCsB3uRrahVmg4z kcDIJo4B1WmE9JBuoT1M6ZnRYzYfVhZL7RkKiN9JqpzdIyE2t+93xFghRGrPy4uieOd9 hBbKs0VhUq0nXabYLKiQg9j+k8dwXi7BU/+ixQaFE/gT/Lkc8XzYO+dA1PZCZg7D+8nl lt/E8mGCkhJeBaJ9D0zt3UBp51h4zlZbPBclMdy2WRYi4AFhdRVtaR50U8o/B0Sdw35h rkym1Q6ziCjVmXGbEul+X1l4oVYq1f6vj7D3ED4DWjXQtmZ3H9+SwFdERKxCXTtoMp+c eeYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=EDawwX8N; 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 w4-v6si12409262pgj.566.2018.10.01.08.28.47; Mon, 01 Oct 2018 08:29:03 -0700 (PDT) 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=fail header.i=@thunk.org header.s=ef5046eb header.b=EDawwX8N; 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 S1729547AbeJAWDx (ORCPT + 99 others); Mon, 1 Oct 2018 18:03:53 -0400 Received: from imap.thunk.org ([74.207.234.97]:36736 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729439AbeJAWDx (ORCPT ); Mon, 1 Oct 2018 18:03:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=56VrLbx0piItw7J2oVlCKP4F9OkbDP2PXVchbORTtEY=; b=EDawwX8NvzH8w182mxZ7LFB3gJ 38+4nmBB5hOAqPKVwwefrJCktRL5YrMAwViDNbWECdSEv9XxtZVJYY3kDngjItfbYluFxo3QN56kL NkfjsElkHy0PcL1tbC6kaRwfGPQucKyoFx4dqUh3Ma4RLITqP7elhocR5MI/JI/OkNkg=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1g704g-0008Jk-72; Mon, 01 Oct 2018 15:25:30 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 7B8867A5186; Mon, 1 Oct 2018 11:25:29 -0400 (EDT) Date: Mon, 1 Oct 2018 11:25:29 -0400 From: "Theodore Y. Ts'o" To: Alan Cox Cc: Dave Chinner , TongZhang , darrick.wong@oracle.com, linux-xfs@vger.kernel.org, LKML , linux-security-module@vger.kernel.org, Wenbo Shen Subject: Re: Leaking Path in XFS's ioctl interface(missing LSM check) Message-ID: <20181001152529.GA2549@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Alan Cox , Dave Chinner , TongZhang , darrick.wong@oracle.com, linux-xfs@vger.kernel.org, LKML , linux-security-module@vger.kernel.org, Wenbo Shen References: <5EF0D46A-C098-4B51-AD13-225FFCA35D4C@vt.edu> <20180926013329.GD31060@dastard> <20180926192426.472360ea@alans-desktop> <20180927013812.GF31060@dastard> <20180930151652.6975610c@alans-desktop> <20181001002521.GM31060@dastard> <20181001160442.47c798bc@alans-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181001160442.47c798bc@alans-desktop> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 01, 2018 at 04:04:42PM +0100, Alan Cox wrote: > > Systems restricted by LSMs to the point where CAP_SYS_ADMIN is not > > trusted have exactly the same issues. i.e. there's nobody trusted by > > the kernel to administer the storage stack, and nobody has defined a > > workable security model that can prevent untrusted users from > > violating the existing storage trust model.... > > With a proper set of LSM checks you can lock the filesystem management > and enforcement to a particular set of objects. You can build that model > where for example only an administrative login from a trusted console may > launch processes to do that management. > > Or you could - if things were not going around the LSM hooks. It would be useful if anyone actually *wants* to do this thing to define a formal security model, and detail *everything* that would need to be changed in order to accomplish it. Just as we don't speculatively add code "just in case" someone might want to use it someday, I don't think we should be adding random LSM hooks just becausre someone *might* want do something. Let's see the use case, and let's see how horrible the changes would need to be, and how credible we think it is that someone will actually want to *use* it. I suspect the chagnes will be a really huge number of places, and not just in XFS.... - Ted