From: Jamie Lokier <jamie@shareable.org>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, Theodore Tso <tytso@mit.edu>,
Chris Mason <chris.mason@oracle.com>,
James Morris <jmorris@namei.org>,
lsm <linux-security-module@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: New reflink(2) syscall
Date: Wed, 6 May 2009 05:28:14 +0100 [thread overview]
Message-ID: <20090506042814.GA14804@shareable.org> (raw)
In-Reply-To: <4A010D3D.4000501@schaufler-ca.com>
Casey Schaufler wrote:
> > Even though you can't read the file if you couldn't read it before,
> > you now have a link to it which might preserve data they don't want to
> > be preserved.
> >
> > So reflink() should, perhaps, be more restricted than link().
>
> If I use reflink() I end up with two sets of initially identical
> security credentials, which is the right thing, but now read access
> (I'll skip write access for now) can be set differently on the two
> inodes via chmod(), chgrp(), chown(), chacl(), and setxattr(). Or
> have I missed something? Is this really your intent?
I guess the idea is that if you can do
chmod/chgrp/chown/chacl/setxattr on the new inode, then you had
sufficient permission to do it on the old inode anyway, so you can
read the data either way.
My points are: (1) You can do it covertly with reflink() - the owner
doesn't know - whereas with link() or just accessing the file
directly, they will notice. (2) You can grab a reflink now while you
don't have permission to read the file, just inadvertant access to
it's directory entry, and perhaps some time in the future you will
have access to read the snapshot you have just grabbed.
(2) Cannot happen without reflink, because the source file owner may
know they have deleted or wiped the file before you are granted enough
permissions to be able to read it. Heck, the owner might be the
system administrator, carefully scrubbing their penguin porn
collection just before they promote you to be another administrator.
reflink() lets you see what they had tantalisingly kept unreadable but
ls'able before - if you had the foresight to use it.
-- Jamie
next prev parent reply other threads:[~2009-05-06 4:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LRH.2.00.0905041655220.21713@tundra.namei.org>
[not found] ` <1241443016.3023.51.camel@localhost.localdomain>
2009-05-04 15:35 ` New reflink(2) syscall James Morris
2009-05-04 16:59 ` Stephen Smalley
2009-05-04 17:49 ` Joel Becker
2009-05-05 18:00 ` Joel Becker
2009-05-05 18:41 ` Stephen Smalley
2009-05-05 19:15 ` Joel Becker
2009-05-05 19:14 ` Stephen Smalley
2009-05-05 19:33 ` Joel Becker
2009-05-05 22:15 ` James Morris
2009-05-05 22:31 ` Joel Becker
2009-05-06 11:23 ` Stephen Smalley
[not found] ` <20090504163514.GB31249@mail.oracle.com>
[not found] ` <1241458669.3023.203.camel@localhost.localdomain>
2009-05-04 18:08 ` Joel Becker
2009-05-04 19:30 ` Stephen Smalley
2009-05-04 21:03 ` Joel Becker
2009-05-04 21:30 ` Joel Becker
2009-05-05 11:44 ` Stephen Smalley
2009-05-05 16:46 ` Joel Becker
2009-05-04 23:13 ` Theodore Tso
2009-05-05 16:47 ` Joel Becker
2009-05-05 16:56 ` Chris Mason
2009-05-05 17:13 ` Joel Becker
2009-05-05 17:34 ` Theodore Tso
2009-05-05 17:44 ` Stephen Smalley
2009-05-05 17:56 ` Joel Becker
2009-05-05 18:21 ` Theodore Tso
2009-05-06 4:27 ` Casey Schaufler
2009-05-06 4:42 ` Jamie Lokier
2009-05-06 5:38 ` Casey Schaufler
2009-05-06 7:12 ` Theodore Tso
2009-05-05 22:45 ` Jamie Lokier
2009-05-06 4:08 ` Casey Schaufler
2009-05-06 4:28 ` Jamie Lokier [this message]
2009-05-06 11:25 ` Stephen Smalley
2009-05-05 17:36 ` Chris Mason
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=20090506042814.GA14804@shareable.org \
--to=jamie@shareable.org \
--cc=casey@schaufler-ca.com \
--cc=chris.mason@oracle.com \
--cc=jmorris@namei.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=tytso@mit.edu \
/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).