From: Ian Bridges <icb@fastmail.org>
To: mike.michalo@gmail.com
Cc: linkinjeon@kernel.org, senozhatsky@chromium.org, tom@talpey.com,
chenxiaosong@chenxiaosong.com, ematsumiya@suse.de,
hyc.lee@gmail.com, linux-cifs@vger.kernel.org,
linux-kernel@vger.kernel.org, Ian Bridges <icb@fastmail.org>
Subject: Re: [PATCH v4 2/6] ksmbd: sign with the negotiated SMB 3.1.1 signing algorithm
Date: Tue, 10 Nov 2026 13:30:59 -0600 [thread overview]
Message-ID: <20261110193059.3200468-1-icb@fastmail.org> (raw)
In-Reply-To: <20261110165834.28162-3-mike.michalo@gmail.com>
Hi Michail,
On Tue, Nov 10, 2026 at 04:58:30PM +0000, Michail Andreas Michalopoulos wrote:
> Since connections of the same session can now use different
> algorithms, each signing key also has to be used with the algorithm it
> was created for. The session signing key belongs to the connection
> that set up the session, and MS-SMB2 3.3.5.5 requires a binding
> request on a new channel to be verified with it. Store that
> connection's algorithm in the session and use it together with the
> session key, while channel keys keep using their own connection's
> algorithm.
I don't think the spec ties the algorithm to the key. MS-SMB2 3.1.4.1
and 3.1.5.1 use Connection.SigningAlgorithmId, the algorithm of the
connection the message travels on. That holds for a binding request
too. The key is Session.SigningKey, but the algorithm is the one the
new connection negotiated.
The two algorithms also cannot differ for a client that follows the
spec. When it opens another connection to a server it is already
connected to, it offers only the algorithm it negotiated before
(3.2.4.2.2.2). ksmbd supports that algorithm, so it picks it again.
So sess->signing_algorithm looks unnecessary. Where the two could
differ, with a client that offers a different list on the new
connection, the patch verifies the binding request with the old
connection's algorithm, while the client signs it with the new one's.
Taking the algorithm from the connection, as the spec does, would
avoid that and the extra field.
Thanks,
Ian
next prev parent reply other threads:[~2026-11-10 19:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 16:58 [PATCH v4 0/6] ksmbd: verify session setup requests before signing with their key Michail Andreas Michalopoulos
2026-11-10 16:58 ` [PATCH v4 1/6] ksmbd: verify the signature of session binding requests Michail Andreas Michalopoulos
2026-11-10 16:58 ` [PATCH v4 2/6] ksmbd: sign with the negotiated SMB 3.1.1 signing algorithm Michail Andreas Michalopoulos
2026-11-10 19:30 ` Ian Bridges [this message]
2026-11-10 16:58 ` [PATCH v4 3/6] ksmbd: use the channel signing key for session setup on a bound channel Michail Andreas Michalopoulos
2026-11-10 16:58 ` [PATCH v4 4/6] ksmbd: check a request before signing STATUS_NETWORK_SESSION_EXPIRED Michail Andreas Michalopoulos
2026-11-10 16:58 ` [PATCH v4 5/6] ksmbd: use the current command's header for signing in a compound Michail Andreas Michalopoulos
2026-11-10 16:58 ` [PATCH v4 6/6] ksmbd: consume the sequence number of a request on a failed session Michail Andreas Michalopoulos
2026-11-10 18:17 ` [PATCH v4 0/6] ksmbd: verify session setup requests before signing with their key mixalhs
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=20261110193059.3200468-1-icb@fastmail.org \
--to=icb@fastmail.org \
--cc=chenxiaosong@chenxiaosong.com \
--cc=ematsumiya@suse.de \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.michalo@gmail.com \
--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®