aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2014-08-17 01:22:24 -0400
committerSteve French <smfrench@gmail.com>2014-08-17 01:41:02 -0400
commit18f39e7be0121317550d03e267e3ebd4dbfbb3ce (patch)
treee8c90a98d73dcd9e08a844cb7f05a9e3b823c766 /fs/cifs
parent754789a1c046106cfdb067102642f73e0fd35fb3 (diff)
[CIFS] Possible null ptr deref in SMB2_tcon
As Raphael Geissert pointed out, tcon_error_exit can dereference tcon and there is one path in which tcon can be null. Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> # v3.7+ Reported-by: Raphael Geissert <geissert@debian.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2pdu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 74440af59f35..240c627bc0c6 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -907,7 +907,8 @@ tcon_exit:
907tcon_error_exit: 907tcon_error_exit:
908 if (rsp->hdr.Status == STATUS_BAD_NETWORK_NAME) { 908 if (rsp->hdr.Status == STATUS_BAD_NETWORK_NAME) {
909 cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree); 909 cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree);
910 tcon->bad_network_name = true; 910 if (tcon)
911 tcon->bad_network_name = true;
911 } 912 }
912 goto tcon_exit; 913 goto tcon_exit;
913} 914}