diff options
| author | Aaditya Kansal <aadityakansal390@gmail.com> | 2026-02-05 06:30:12 +0530 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-02-15 18:35:34 -0600 |
| commit | dc96f01d54cc7c785c98ee6e2b53075949ac16ed (patch) | |
| tree | 99e56bf3c96c35ec1806d6a054b6c6d8ab4a27a7 /fs | |
| parent | 14f66f44646333d2bfd7ece36585874fd72f8286 (diff) | |
smb: client: terminate session upon failed client required signing
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>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/smb/client/smb1transport.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/smb/client/smb1transport.c b/fs/smb/client/smb1transport.c index 93731b00ca5d..38d6d5538b96 100644 --- a/fs/smb/client/smb1transport.c +++ b/fs/smb/client/smb1transport.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? */ |
