Commit dc96f01d authored by Aaditya Kansal's avatar Aaditya Kansal Committed by Steve French
Browse files

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: default avatarAaditya Kansal <aadityakansal390@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 14f66f44
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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? */