projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48923d2
)
CIFS: Fix NULL pointer deref on SMB2_tcon() failure
author
Aurélien Aptel
<
[email protected]
>
Wed, 11 Oct 2017 11:23:36 +0000
(13:23 +0200)
committer
Steve French
<
[email protected]
>
Wed, 25 Oct 2017 17:58:54 +0000
(12:58 -0500)
If SendReceive2() fails rsp is set to NULL but is dereferenced in the
error handling code.
Cc:
[email protected]
Signed-off-by: Aurelien Aptel <
[email protected]
>
Reviewed-by: Pavel Shilovsky <
[email protected]
>
Signed-off-by: Steve French <
[email protected]
>
fs/cifs/smb2pdu.c
patch
|
blob
|
history
diff --git
a/fs/cifs/smb2pdu.c
b/fs/cifs/smb2pdu.c
index fa17caa56128e2b760d820bdf806b99972c0ccf1..3efcd96b52c55d969aec1e8c12acbe0ed28d2cd9 100644
(file)
--- a/
fs/cifs/smb2pdu.c
+++ b/
fs/cifs/smb2pdu.c
@@
-1255,7
+1255,7
@@
SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
struct smb2_tree_connect_req *req;
struct smb2_tree_connect_rsp *rsp = NULL;
struct kvec iov[2];
- struct kvec rsp_iov;
+ struct kvec rsp_iov
= { NULL, 0 }
;
int rc = 0;
int resp_buftype;
int unc_path_len;
@@
-1372,7
+1372,7
@@
tcon_exit:
return rc;
tcon_error_exit:
- if (rsp->hdr.sync_hdr.Status == STATUS_BAD_NETWORK_NAME) {
+ if (rsp
&& rsp
->hdr.sync_hdr.Status == STATUS_BAD_NETWORK_NAME) {
cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree);
}
goto tcon_exit;