From: Tom Talpey <tom@talpey.com>
To: Enzo Matsumiya <ematsumiya@suse.de>,
samba-technical@lists.samba.org, linux-cifs@vger.kernel.org
Cc: smfrench@gmail.com
Subject: Re: Signature check for LOGOFF response
Date: Sat, 19 Mar 2022 08:28:19 -0400 [thread overview]
Message-ID: <a0972fb5-38d3-5990-7c8e-0b7dd61d1abb@talpey.com> (raw)
In-Reply-To: <20220319032012.46ezg2pxjlrsdlpq@cyberdelia>
On 3/18/2022 11:20 PM, Enzo Matsumiya wrote:
> Hi,
>
> The LOGOFF command response is not signed (=> signature is 0x0), but we
> check it anyway, displaying "sign fail" errors in ring buffer.
What server is returning this unsigned response? Assuming it's Windows,
that is either a doc bug or (arguably) a server bug, and should be
reported before deciding how to address it here.
Tom.
> As far as I checked, an explicit LOGOUT is only sent when tlink pruning
> happens (i.e. TLINK_IDLE_EXPIRE expires), but we have a case of this
> causing issues on production env.
>
> I didn't find LOGOFF being a signature check exception in MS-SMB2 rev64.
> Relevant sections:
>
> 2.2.7 SMB2 LOGOFF Request
> 2.2.8 SMB2 LOGOFF Response
> 3.2.5.4 Receiving an SMB2 LOGOFF Response
> 3.3.5.6 Receiving an SMB2 LOGOFF Request
>
> If this is implementation defined, maybe something like this could work?
> (100% untested)
>
> --- a/fs/cifs/smb2transport.c
> +++ b/fs/cifs/smb2transport.c
> @@ -667,6 +667,7 @@ smb2_verify_signature(struct smb_rqst *rqst, struct
> TCP_Server_Info *server)
> if ((shdr->Command == SMB2_NEGOTIATE) ||
> (shdr->Command == SMB2_SESSION_SETUP) ||
> (shdr->Command == SMB2_OPLOCK_BREAK) ||
> + (shdr->Command == SMB2_LOGOFF) ||
> server->ignore_signature ||
> (!server->session_estab))
> return 0;
>
> Thoughts?
>
>
> Enzo
>
next prev parent reply other threads:[~2022-03-19 12:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-19 3:20 Signature check for LOGOFF response Enzo Matsumiya
2022-03-19 12:28 ` Tom Talpey [this message]
2022-03-23 17:29 ` Enzo Matsumiya
2022-03-24 15:04 ` Tom Talpey
2022-03-24 16:23 ` Jeremy Allison
2022-03-24 18:48 ` Tom Talpey
2022-03-24 18:52 ` Jeremy Allison
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=a0972fb5-38d3-5990-7c8e-0b7dd61d1abb@talpey.com \
--to=tom@talpey.com \
--cc=ematsumiya@suse.de \
--cc=linux-cifs@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=smfrench@gmail.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