Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Aaditya Kansal <aadityakansal390@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: sfrench@samba.org, linux-cifs@vger.kernel.org
Subject: Re: [PATCH v2] smb: client: terminate session upon failed client required signing
Date: Mon, 16 Feb 2026 00:53:12 +0530	[thread overview]
Message-ID: <edd75933-91b7-428e-b88b-dcc4e8bdcae7@gmail.com> (raw)
In-Reply-To: <CAH2r5mt+608DDhj93Fa55PZ_-1yfJZTa5v4LQ-D48V9ZYPDJUA@mail.gmail.com>


On 2/16/26 00:01, Steve French wrote:
> On Sun, Feb 15, 2026 at 7:17 AM Aaditya Kansal
> <aadityakansal390@gmail.com> wrote:
>>
>>
>> On 2/5/26 06:30, Aaditya Kansal wrote:
>>> Currently, when smb signature verification fails, the behaviour is to log
>>> the failure without any action to terminate the session.
>>>
>>> Call cifs_reconnect() when client required signature verification fails.
>>> Otherwise, log the error without reconnecting.
>>>
>>> Signed-off-by: Aaditya Kansal <aadityakansal390@gmail.com>
>>> ---
>>> Changes in v2:
>>> - reconnect only triggered when client required signature verification fails
>>> ---
>>>  fs/smb/client/cifstransport.c | 10 ++++++++--
>>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/fs/smb/client/cifstransport.c b/fs/smb/client/cifstransport.c
>>> index 28d1cee90625..6c1fbf0bef6d 100644
>>> --- a/fs/smb/client/cifstransport.c
>>> +++ b/fs/smb/client/cifstransport.c
>>> @@ -169,12 +169,18 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
>>>
>>>               iov[0].iov_base = mid->resp_buf;
>>>               iov[0].iov_len = len;
>>> -             /* FIXME: add code to kill session */
>>> +
>>>               rc = cifs_verify_signature(&rqst, server,
>>>                                          mid->sequence_number);
>>> -             if (rc)
>>> +             if (rc) {
>>>                       cifs_server_dbg(VFS, "SMB signature verification returned error = %d\n",
>>>                                rc);
>>> +
>>> +                     if (!(server->sec_mode & SECMODE_SIGN_REQUIRED)) {
>>> +                             cifs_reconnect(server, true);
>>> +                             return rc;
>>> +                     }
>>> +             }
>>>       }
>>>
>>>       /* BB special case reconnect tid and uid here? */
>> Hi, I am writing this as a ping for this patch. Thanks
> merged into cifs-2.6.git for-next but had to rebase it to merge into
> current code.
>
> Have you verified the behavior of default (smb3.1.1) mounts as well?
>
Thank you. Yes, I have checked it for the default version.
Tested for both client required and server required signature verification.

-- 
-AK



  reply	other threads:[~2026-02-15 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05  1:00 [PATCH v2] smb: client: terminate session upon failed client required signing Aaditya Kansal
2026-02-15 13:16 ` Aaditya Kansal
2026-02-15 18:31   ` Steve French
2026-02-15 19:23     ` Aaditya Kansal [this message]
2026-02-15 21:08       ` Steve French
2026-02-15 22:42         ` Aaditya Kansal
2026-02-16  1:24           ` Steve French
2026-02-16  5:18             ` Aaditya Kansal

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=edd75933-91b7-428e-b88b-dcc4e8bdcae7@gmail.com \
    --to=aadityakansal390@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=sfrench@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