Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp602907pxv; Wed, 30 Jun 2021 13:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYTyL0633TzSpdEshxZqt9BUTsYfwBrpBlvqcexqp/DtulTdMSaefe6D2LRLGRGmTF6ByH X-Received: by 2002:a92:1944:: with SMTP id e4mr26582893ilm.186.1625083307991; Wed, 30 Jun 2021 13:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625083307; cv=none; d=google.com; s=arc-20160816; b=1HohJQlAGezxsVjY87tKCBiisLo1mf5ZN+3fsVdxBGdpc/26SOImy6DwrdMziTcK+k LTLxGF6NiCsGU0AWQD/Imcl6dHTLJWBwKark602S5LVpZvzBvpf7PyEUekdsJzjZ09LJ M/kEjcrXmymBSDY9sNuiDqm9zz3il+N6qJUfHy5mmf4H2o8ykVjXFbQdmKeFCOY+3wAW CiDthhtKq4CKp0mQQddCn46RRj9iWyYom97i1ZCJykCQRM7wPMETUy0Yau+m9k6sR8RF +tNLocZXIEQoS+/bwD7vJJ0JeQcp0ikq60TEVphCroEMWxHCTSeHIuqUOqxr9tKr39U0 jC6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=KzOen9izg03CPjyls+FbgpFiBehTMsTBAqFKgcFmle0=; b=n0m+uQLfjRnL7vl84hrJDwLFlTu8wCN4JNQzGA6Ge2JP0hB5VL0kMGLMxATOBfkmb0 ioi2LTeYSwNYrcdJJaBoGASKFqBnOskQGc6ovL1pCV1hr45znseVPdt+YiCQeY8N172q Y8suamnwNUO3vdbkv/AIDbxSOcDt66aSKGjsPA1XMIWEFAUzWrSeR99x22HGf9VdnUDR Fj7NxDXr3TKJpb2/3MU90hIhxdFfcUG9J8LZdiA3gAQuEoj5F04/3KSSiXff66rI9kC9 I0Q7hPFRtV5+ImYpa7Nxq/1BTfX6r82zd4ZQN9SH5QzQuO177QSn61IROmDTQwagUGxj H4Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si28314854ilj.131.2021.06.30.13.01.34; Wed, 30 Jun 2021 13:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233985AbhF3UCV (ORCPT + 99 others); Wed, 30 Jun 2021 16:02:21 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:35779 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233693AbhF3UCU (ORCPT ); Wed, 30 Jun 2021 16:02:20 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 15UJxfAp014915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:59:42 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 7001C15C3C8E; Wed, 30 Jun 2021 15:59:41 -0400 (EDT) Date: Wed, 30 Jun 2021 15:59:41 -0400 From: "Theodore Ts'o" To: "Dr. David Alan Gilbert" Cc: Daniel Walsh , Vivek Goyal , Casey Schaufler , "Schaufler, Casey" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "virtio-fs@redhat.com" , "berrange@redhat.com" , linux-security-module , "selinux@vger.kernel.org" Subject: Re: [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE Message-ID: References: <20210629152007.GC5231@redhat.com> <78663f5c-d2fd-747a-48e3-0c5fd8b40332@schaufler-ca.com> <20210629173530.GD5231@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 04:01:42PM +0100, Dr. David Alan Gilbert wrote: > > Even if you fix symlinks, I don't think it fixes device nodes or > anything else where the permissions bitmap isn't purely used as the > permissions on the inode. I think we're making a mountain out of a molehill. Again, very few people are using quota these days. And if you give someone write access to a 8TB disk, do you really care if they can "steal" 32k worth of space (which is the maximum size of an xattr, enforced by the VFS). OK, but what about character mode devices? First of all, most users don't have access to huge number of devices, but let's assume something absurd. Let's say that a user has write access to *1024* devices. (My /dev has 233 character mode devices, and I have write access to well under a dozen.) An 8TB disk costs about $200. So how much of the "stolen" quota space are we talking about, assuming the user has access to 1024 devices, and the file system actually supports a 32k xattr. 32k * 1024 * $200 / 8TB / (1024*1024*1024) = $0.000763 = 0.0763 cents A 2TB SSD is less around $180, so even if we calculate the prices based on SSD space, we're still talking about a quarter of a penny. Why are we worrying about this? - Ted