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

CIFS: Possible null ptr deref in SMB2_tcon

commit 18f39e7be0121317550d03e267e3ebd4dbfbb3ce 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 <>
Reported-by: default avatarRaphael Geissert <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 8f516091
......@@ -809,7 +809,8 @@ tcon_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