From: Dan Carpenter <dan.carpenter@oracle.com>
To: stfrench@microsoft.com
Cc: linux-cifs@vger.kernel.org
Subject: [bug report] smb3: remove confusing dmesg when mounting with encryption ("seal")
Date: Fri, 8 Nov 2019 08:19:55 +0300 [thread overview]
Message-ID: <20191108051954.GA27432@mwanda> (raw)
Hello Steve French,
This is a semi-automatic email about new static checker warnings.
The patch 6a364520b30e: "smb3: remove confusing dmesg when mounting
with encryption ("seal")" from Nov 5, 2019, leads to the following
Smatch complaint:
fs/cifs/connect.c:1091 cifs_handle_standard()
warn: variable dereferenced before check 'mid' (see line 1075)
fs/cifs/connect.c
1074 length = server->ops->check_message(buf, server->total_read, server,
1075 mid->decrypted);
^^^^^^^^^^^^^^
New unchecked dereference.
1076 if (length != 0)
1077 cifs_dump_mem("Bad SMB: ", buf,
1078 min_t(unsigned int, server->total_read, 48));
1079
1080 if (server->ops->is_session_expired &&
1081 server->ops->is_session_expired(buf)) {
1082 cifs_reconnect(server);
1083 wake_up(&server->response_q);
1084 return -1;
1085 }
1086
1087 if (server->ops->is_status_pending &&
1088 server->ops->is_status_pending(buf, server))
1089 return -1;
1090
1091 if (!mid)
^^^^
The old code assumed it could be NULL.
1092 return length;
1093
regards,
dan carpenter
next reply other threads:[~2019-11-08 5:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 5:19 Dan Carpenter [this message]
2019-11-08 6:58 ` [bug report] smb3: remove confusing dmesg when mounting with encryption ("seal") Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191108051954.GA27432@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-cifs@vger.kernel.org \
--cc=stfrench@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).