From: Ian Bridges <icb@fastmail.org>
To: jan.koester@tuxist.de
Cc: linkinjeon@kernel.org, senozhatsky@chromium.org, tom@talpey.com,
chenxiaosong@chenxiaosong.com, brauner@kernel.org,
linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, Ian Bridges <icb@fastmail.org>
Subject: Re: [RFC PATCH 3/6] ksmbd: pass the domain of an NTLM login to user space
Date: Wed, 11 Nov 2026 10:04:13 -0600 [thread overview]
Message-ID: <20261111160413.4127821-1-icb@fastmail.org> (raw)
In-Reply-To: <82748744eeaac5828009aab4@groupi3>
Hi Jan,
On Tue, Nov 10, 2026 at 09:02:41AM +0000, Jan Koester wrote:
> + if (domain && domain[0] &&
> + strlen(domain) < KSMBD_REQ_MAX_DOMAIN_NAME_SZ) {
> + req->flags |= KSMBD_LOGIN_REQ_DOMAIN;
> + strscpy(req->domain, domain, KSMBD_REQ_MAX_DOMAIN_NAME_SZ);
> + }
Is a domain of 48 bytes or more meant to be left out here? User space
would then pick the account by its name alone, which is the ambiguity
this patch removes. NTLM puts no such limit on DomainName.
session_user() also seems to drop the domain when its bounds fall
outside the buffer or it cannot be decoded. Would it be safer to fail
the login in those cases rather than fall back to the account name
alone?
Thanks,
Ian
next prev parent reply other threads:[~2026-11-11 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 9:02 Jan Koester
2026-11-11 16:04 ` Ian Bridges [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-28 6:19 [RFC PATCH 0/6] ksmbd: Windows SIDs for user and group ids Jan Koester
2026-10-28 6:20 ` [RFC PATCH 3/6] ksmbd: pass the domain of an NTLM login to user space Jan Koester
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=20261111160413.4127821-1-icb@fastmail.org \
--to=icb@fastmail.org \
--cc=brauner@kernel.org \
--cc=chenxiaosong@chenxiaosong.com \
--cc=jan.koester@tuxist.de \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=senozhatsky@chromium.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®