diff options
author | Steve French <smfrench@gmail.com> | 2014-08-17 00:22:24 -0500 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-09-17 17:06:54 +0200 |
commit | 897ebdd35fad90a475e34e30b0660809347f511f (patch) | |
tree | 92fa770ca2d538f7feab300d9ebcb55458188363 /fs/cifs | |
parent | 98bbdfdb93af137f5364dddff5286633644cc9d1 (diff) | |
download | lwn-897ebdd35fad90a475e34e30b0660809347f511f.tar.gz lwn-897ebdd35fad90a475e34e30b0660809347f511f.zip |
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: Steve French <smfrench@gmail.com>
Reported-by: Raphael Geissert <geissert@debian.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 829ad35f98d4..7cf843b976fd 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -912,7 +912,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; } |