aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <paulo@paulo.ac>2018-06-13 12:54:14 -0400
committerSteve French <stfrench@microsoft.com>2018-06-15 03:38:08 -0400
commitcd2dca60be6f4742b63373fd7e4b445c8a634e51 (patch)
tree495bf7e6a9f2f6aca983c5ebaf28642ffe886ef3
parent07cd952f3ad51bc7f87dcdba0faac979ee559fd3 (diff)
cifs: Fix encryption/signing
Since the rfc1002 generation was moved down to __smb_send_rqst(), the transform header is now in rqst->rq_iov[0]. Correctly assign the transform header pointer in crypt_message(). Signed-off-by: Paulo Alcantara <palcantara@suse.de> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/cifs/smb2ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 9153407f97e8..c3648e9b5ec7 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -2187,7 +2187,7 @@ static inline void smb2_sg_set_buf(struct scatterlist *sg, const void *buf,
2187} 2187}
2188 2188
2189/* Assumes: 2189/* Assumes:
2190 * rqst->rq_iov[0] is tranform header 2190 * rqst->rq_iov[0] is transform header
2191 * rqst->rq_iov[1+] data to be encrypted/decrypted 2191 * rqst->rq_iov[1+] data to be encrypted/decrypted
2192 */ 2192 */
2193static struct scatterlist * 2193static struct scatterlist *
@@ -2249,7 +2249,7 @@ static int
2249crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc) 2249crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc)
2250{ 2250{
2251 struct smb2_transform_hdr *tr_hdr = 2251 struct smb2_transform_hdr *tr_hdr =
2252 (struct smb2_transform_hdr *)rqst->rq_iov[1].iov_base; 2252 (struct smb2_transform_hdr *)rqst->rq_iov[0].iov_base;
2253 unsigned int assoc_data_len = sizeof(struct smb2_transform_hdr) - 20; 2253 unsigned int assoc_data_len = sizeof(struct smb2_transform_hdr) - 20;
2254 int rc = 0; 2254 int rc = 0;
2255 struct scatterlist *sg; 2255 struct scatterlist *sg;