From: L A Walsh <xfs@tlinx.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: bfoster@redhat.com, xfs <linux-xfs@vger.kernel.org>
Subject: Re: suggested patch to allow user to access their own file...
Date: Mon, 04 Jan 2021 16:03:23 -0800 [thread overview]
Message-ID: <5FF3ACCB.3030909@tlinx.org> (raw)
In-Reply-To: <20210104231508.GP6918@magnolia>
On 2021/01/04 15:15, Darrick J. Wong wrote:
>> Cc: bfoster@redhat.com, xfs-oss <xfs@e29208.dscx.akamaiedge.net>
>
> akamaiedge.net ??
---
First I've seen that...
>
> Er, did my mailer do that, or did yours?
>
> [re-adding linux-xfs to cc]
>
> On Mon, Jan 04, 2021 at 12:24:14PM -0800, L A Walsh wrote:
>>
>> On 2021/01/04 10:44, Darrick J. Wong wrote:
>>> This would open a huge security hole because users can use it to bypass
>>> directory access checks.
>> ---
>> Can't say I entirely disagree. Though given the prevalence of that
>> behavior being "normal" on NT due to the "Bypass Traverse Checking" "right"
>> being on by default in a standard Windows setup,
>
> That might be true on Windows, but CAP_DAC_* isn't given out by default
> on Linux.
----
Not quite the same as I understand it -- it allows ignoring
an 'X' permission of directories above the target, I believe, but not other
DAC permissions. I'd have to experiment to be sure. In their security
settings dialogue, they warn you against changing it away from the default
as it might cause compatibility problems.
>
>> I would question it being a 'huge' security hole, though it would be
>> an unwanted change in behavior.
>
> I think people would consider it a hole of /some/ kind, since this patch
> wouldn't even require the process to hold CAP_DAC_* privilege.
---
Yeah, though it doesn't allow overriding DAC settings on files
or directories that have them when trying to access them, just bypassing
directory traversal permissions for items lower in the hierarchy.
>
> Yeah. As far as I can tell, CAP_DAC_OVERRIDE actually /does/ give you
> the security permissions that you want. The sysadmin can then decide
> who gets to have that permission, so you /could/ propose doing that.
----
Except that it does more than just allowing directory traversal
to a set of files you own. Like I think it might not be uncommon to have
some common home dir set restrictively, so you couldn't read who else had
home directories on the system, perhaps, but you could still cd through
it to your own directory. It may be more like allowing you to 'x' through
parent directories without being able to read/write to them. CAP_DAC_OVERRIDE
would allow you to override any DAC permissions on any file -- not just
ignore lack of 'X' on a directory.
>
>> If it isn't possible already, I'm sure it soon will be
>> the case that users will be on systems that have different file
>> systems mounted. If an xfs file system is mounted under an NT
>> file system and the user is running Windows, wouldn't NT-rights
>> (like ignoring traversal issues) apply by default, as NT would
>> be in charge of enforcing security as it walked through a locally
>> mounted XFS file system?
>
> When would NT be walking through a locally mounted XFS filesystem?
Well, at least when it is mounted in a linux subsystem -- I haven't checked
out what's possible, but am told explorer can then be used to move through
file systems that are locally mounted through the linux drivers.
The other possibility -- is a stretch of locally mounted, in having
an XFS drive mounted via CIFS as a "local" drive. I'd think it would
allow bypassing traverse checking in the same way that having
NT-admin privileges can give you root access to exported drives, but
you have to set it up so that your login has those privs on the target server,
but less drastic privs, like bypassing traverse checking and having
a read/write access for a user that has the backup+restore privs are likely
also supported.
As an example, a Domain administrator on my NT workstation has root access
to my server (not by accident, but because it is meant to be that way).
I use Win as a desktop, but lin as my diskspace+server. My Win desktop barely
has enough diskspace for the OS + programs I have installed.
next prev parent reply other threads:[~2021-01-05 0:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 12:25 suggested patch to allow user to access their own file L.A. Walsh
2021-01-04 17:08 ` Brian Foster
2021-01-04 18:44 ` Darrick J. Wong
[not found] ` <5FF3796E.5050409@tlinx.org>
2021-01-04 23:15 ` Darrick J. Wong
2021-01-05 0:03 ` L A Walsh [this message]
2021-01-09 21:13 ` Dave Chinner
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=5FF3ACCB.3030909@tlinx.org \
--to=xfs@tlinx.org \
--cc=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/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