From: Andreas Hasenack <andreas@canonical.com>
To: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
Steve French <smfrench@gmail.com>,
Stable <stable@vger.kernel.org>
Subject: Re: [PATCH] cifs: allow guest mounts to work for smb3.11
Date: Thu, 21 Mar 2019 14:13:18 -0300 [thread overview]
Message-ID: <CANYNYEHur0w8iNZBHUbc=NJopAH84gLb5k-Wv1ShU9--qREoCw@mail.gmail.com> (raw)
In-Reply-To: <20190321045902.14326-1-lsahlber@redhat.com>
Hello Ronnie,
On Thu, Mar 21, 2019 at 1:59 AM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> Fix Guest/Anonymous sessions so that they work with SMB 3.11.
>
> In git commit 6188f28 tightened the conditions and forced signing for
> the SMB2-TreeConnect commands as per MS-SMB2.
> However, this should only apply to normal user sessions and not for
> Guest/Anonumous sessions.
>
> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> CC: Stable <stable@vger.kernel.org>
> ---
> fs/cifs/smb2pdu.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index c399e09b76e6..8e4a1da95418 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -1628,9 +1628,13 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
> iov[1].iov_base = unc_path;
> iov[1].iov_len = unc_path_len;
>
> - /* 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 */
> + /*
> + * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1
> + * unless it is guest or anonymous user. See MS-SMB2 3.2.5.3.1
> + */
> if ((ses->server->dialect == SMB311_PROT_ID) &&
> - !smb3_encryption_required(tcon))
> + !smb3_encryption_required(tcon) &&
> + !(ses->session_flags & (SMB2_SESSION_FLAG_IS_GUEST|SMB2_SESSION_FLAG_IS_NULL)))
> req->sync_hdr.Flags |= SMB2_FLAGS_SIGNED;
>
> memset(&rqst, 0, sizeof(struct smb_rqst));
> --
> 2.13.6
>
I tried this patch with an ubuntu kernel
(https://people.canonical.com/~tyhicks/disco-cifs.2/ specifically) but
it didn't work, I'm still getting failures with smb3.11 and a guest
mount.
Maybe I'm missing some other fix, or a more up-to-date kernel? Shall I
try with a self-compiled upstream one?
dmesg: http://paste.ubuntu.com/p/JGhCsgBVcb/
server logs (debug level 5, samba 4.10.0):
log.: http://paste.ubuntu.com/p/jMDJ8DBfRM/
log.smbd: http://paste.ubuntu.com/p/Z9W5z28BP9/
smb.conf: http://paste.ubuntu.com/p/9HpSyFq8n8/
next prev parent reply other threads:[~2019-03-21 17:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 4:59 [PATCH] cifs: allow guest mounts to work for smb3.11 Ronnie Sahlberg
2019-03-21 11:46 ` Aurélien Aptel
2019-03-21 15:36 ` Steve French
2019-03-21 17:13 ` Andreas Hasenack [this message]
2019-03-21 19:54 ` ronnie sahlberg
2019-03-22 23:30 ` Steve French
2019-03-23 0:20 ` Tom Talpey
2019-03-23 0:41 ` Steve French
2019-03-23 1:27 ` Tom Talpey
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='CANYNYEHur0w8iNZBHUbc=NJopAH84gLb5k-Wv1ShU9--qREoCw@mail.gmail.com' \
--to=andreas@canonical.com \
--cc=linux-cifs@vger.kernel.org \
--cc=lsahlber@redhat.com \
--cc=smfrench@gmail.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).