]> Git Repo - linux.git/commitdiff
smb3: fix oops in calculating shash_setkey
authorSteve French <[email protected]>
Mon, 3 Oct 2022 03:09:45 +0000 (22:09 -0500)
committerSteve French <[email protected]>
Sat, 8 Oct 2022 04:08:41 +0000 (23:08 -0500)
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]>
fs/cifs/smb2transport.c

index dfcbcc0b86e4aadabe57ba03e8f99f51b2350541..8e3f26e6f6b9b46727c623012c51427e6b597e28 100644 (file)
@@ -215,7 +215,7 @@ smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server,
        struct kvec *iov = rqst->rq_iov;
        struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base;
        struct cifs_ses *ses;
-       struct shash_desc *shash;
+       struct shash_desc *shash = NULL;
        struct smb_rqst drqst;
 
        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,
        unsigned char *sigptr = smb3_signature;
        struct kvec *iov = rqst->rq_iov;
        struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base;
-       struct shash_desc *shash;
+       struct shash_desc *shash = NULL;
        struct smb_rqst drqst;
        u8 key[SMB3_SIGN_KEY_SIZE];
 
This page took 0.049793 seconds and 4 git commands to generate.