linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Daniel Walsh <dwalsh@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	Casey Schaufler <casey@schaufler-ca.com>,
	"Schaufler, Casey" <casey.schaufler@intel.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"virtio-fs@redhat.com" <virtio-fs@redhat.com>,
	"berrange@redhat.com" <berrange@redhat.com>,
	linux-security-module <linux-security-module@vger.kernel.org>,
	"selinux@vger.kernel.org" <selinux@vger.kernel.org>
Subject: Re: [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE
Date: Wed, 30 Jun 2021 15:59:41 -0400	[thread overview]
Message-ID: <YNzNLTxflKbDi8W2@mit.edu> (raw)
In-Reply-To: <YNyHVhGPe1bFAt+C@work-vm>

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

  reply	other threads:[~2021-06-30 19:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210625191229.1752531-1-vgoyal@redhat.com>
2021-06-25 21:49 ` [RFC PATCH 0/1] xattr: Allow user.* xattr on symlink/special files if caller has CAP_SYS_RESOURCE Schaufler, Casey
2021-06-28 11:58   ` Dr. David Alan Gilbert
2021-06-28 13:17   ` Vivek Goyal
2021-06-28 13:36     ` Daniel Walsh
2021-06-28 16:04       ` Casey Schaufler
2021-06-28 16:28         ` Dr. David Alan Gilbert
2021-06-28 17:41           ` Casey Schaufler
2021-06-29  9:00             ` Dr. David Alan Gilbert
2021-06-29 14:38               ` Casey Schaufler
2021-06-29 15:20                 ` Vivek Goyal
2021-06-29 16:13                   ` Casey Schaufler
2021-06-29 16:35                     ` Dr. David Alan Gilbert
2021-06-29 16:51                       ` Casey Schaufler
2021-06-29 17:35                     ` Vivek Goyal
2021-06-29 20:28                       ` Daniel Walsh
2021-06-30  4:12                         ` Theodore Ts'o
2021-06-30  8:07                           ` Dr. David Alan Gilbert
2021-06-30 14:47                             ` Theodore Ts'o
2021-06-30 15:01                               ` Dr. David Alan Gilbert
2021-06-30 19:59                                 ` Theodore Ts'o [this message]
2021-06-30 20:32                                   ` Vivek Goyal
2021-07-01  8:48                                   ` Dr. David Alan Gilbert
2021-07-01 12:21                                     ` Vivek Goyal
2021-07-01 13:10                                     ` Vivek Goyal
2021-07-01 16:58                                       ` Casey Schaufler
2021-06-30 16:09                               ` Vivek Goyal
2021-06-30 14:27                           ` Vivek Goyal
2021-06-29 16:25                 ` Theodore Ts'o
2021-06-28 17:22         ` Vivek Goyal
2021-06-28 18:55         ` Daniel Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNzNLTxflKbDi8W2@mit.edu \
    --to=tytso@mit.edu \
    --cc=berrange@redhat.com \
    --cc=casey.schaufler@intel.com \
    --cc=casey@schaufler-ca.com \
    --cc=dgilbert@redhat.com \
    --cc=dwalsh@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=selinux@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).