mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: Ian Bridges <icb@fastmail.org>
Cc: senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com,  linux-cifs@vger.kernel.org,
	linux-kernel@vger.kernel.org,  stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ksmbd: evaluate the DACL in order for explicit access requests
Date: Sun, 8 Nov 2026 10:31:08 +0900	[thread overview]
Message-ID: <CAKYAXd-jNcP61uk8wm2xq6dtuw4_Cf-r1WDdUHSBQLJzdkOF2w@mail.gmail.com> (raw)
In-Reply-To: <20261107231941.1824289-2-icb@fastmail.org>

> @@ -1680,7 +1706,8 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
>                     !(ace->flags & INHERIT_ONLY_ACE))
>                         or_ace = true;
>                 if (!compare_sids(&sid_everyone, &ace->sid) ||
> -                   !compare_sids(&sid_authusers, &ace->sid))
> +                   (authusers &&
> +                    !compare_sids(&sid_authusers, &ace->sid)))
>                         others_ace = ace;
For a guest session, this can leave both found and others_ace clear,
allowing the POSIX ACL fallback to overwrite the ordered DACL result.
For example, consider a file whose DACL grants only FILE_READ_DATA to
Authenticated Users, with a named POSIX ACL entry granting rw to the
guest UID. An explicit FILE_WRITE_DATA check returns -EACCES on the
base tree, but succeeds after this patch. A preceding deny ACE for one
of the guest's groups can also be bypassed through this path.
Please retain the fact that an Authenticated Users ACE was present
when deciding whether to use the POSIX ACL fallback, while excluding
that ACE from the rights granted to the guest. This also affects
anonymous sessions and remains after applying patch 2/2.

Thanks.

  reply	other threads:[~2026-11-08  1:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 23:19 [PATCH v2 0/2] ksmbd: fix explicit DACL checks and parent-derived rights Ian Bridges
2026-11-07 23:19 ` [PATCH v2 1/2] ksmbd: evaluate the DACL in order for explicit access requests Ian Bridges
2026-11-08  1:31   ` Namjae Jeon [this message]
2026-11-08 15:32     ` Ian Bridges
2026-11-07 23:19 ` [PATCH v2 2/2] ksmbd: let the parent's DACL grant DELETE and FILE_READ_ATTRIBUTES Ian Bridges

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=CAKYAXd-jNcP61uk8wm2xq6dtuw4_Cf-r1WDdUHSBQLJzdkOF2w@mail.gmail.com \
    --to=linkinjeon@kernel.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=icb@fastmail.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.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

all inboxes | Powered by JetHome®