diff options
author | Steve French <smfrench@gmail.com> | 2014-08-17 00:22:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-17 09:04:01 -0700 |
commit | c6bef3b64c1e605f4059189153de3251855846b9 (patch) | |
tree | 779783ea75fb6868845d36ba16d255c0c6894891 /fs/cifs | |
parent | 8f516091b6c747c2db53b33c0eb955c5b3975792 (diff) | |
download | linux-3.10-c6bef3b64c1e605f4059189153de3251855846b9.tar.gz linux-3.10-c6bef3b64c1e605f4059189153de3251855846b9.tar.bz2 linux-3.10-c6bef3b64c1e605f4059189153de3251855846b9.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 c7a6fd87bb6..184c55820d1 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -809,7 +809,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; } |