Skip to content

Commit 958553d

Browse files
committed
smb3: fix oops in calculating shash_setkey
shash was not being initialized in one place in smb3_calc_signature and smb2_calc_signature Reviewed-by: Enzo Matsumiya <[email protected]> Acked-by: Tom Talpey <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 1f3d547 commit 958553d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/cifs/smb2transport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server,
215215
struct kvec *iov = rqst->rq_iov;
216216
struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base;
217217
struct cifs_ses *ses;
218-
struct shash_desc *shash;
218+
struct shash_desc *shash = NULL;
219219
struct smb_rqst drqst;
220220

221221
ses = smb2_find_smb_ses(server, le64_to_cpu(shdr->SessionId));
@@ -535,7 +535,7 @@ smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server,
535535
unsigned char *sigptr = smb3_signature;
536536
struct kvec *iov = rqst->rq_iov;
537537
struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base;
538-
struct shash_desc *shash;
538+
struct shash_desc *shash = NULL;
539539
struct smb_rqst drqst;
540540
u8 key[SMB3_SIGN_KEY_SIZE];
541541

0 commit comments

Comments
 (0)