Commit fa7007a5 authored by Steve French's avatar Steve French Committed by Greg Kroah-Hartman

CIFS: Possible null ptr deref in SMB2_tcon

commit 18f39e7b upstream.

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: default avatarSteve French <smfrench@gmail.com>
Reported-by: default avatarRaphael Geissert <geissert@debian.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09f07a14
......@@ -922,7 +922,8 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
tcon_error_exit:
if (rsp->hdr.Status == STATUS_BAD_NETWORK_NAME) {
cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree);
tcon->bad_network_name = true;
if (tcon)
tcon->bad_network_name = true;
}
goto tcon_exit;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment