From: Steve French Date: Sun, 17 Aug 2014 05:22:24 +0000 (-0500) Subject: [CIFS] Possible null ptr deref in SMB2_tcon X-Git-Tag: firefly_0821_release~176^2~3358^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18f39e7be0121317550d03e267e3ebd4dbfbb3ce;p=firefly-linux-kernel-4.4.55.git [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 CC: Stable # v3.7+ Reported-by: Raphael Geissert --- 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: 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; }