From: Sachin Prabhu <sprabhu@redhat.com>
To: Steve French <smfrench@gmail.com>
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] [CIFS] Don't ignore errors on encrypting password in SMBTcon
Date: Mon, 30 Mar 2015 10:44:04 +0100 [thread overview]
Message-ID: <1427708644.14176.3.camel@redhat.com> (raw)
In-Reply-To: <1427434082-4299-3-git-send-email-smfrench@gmail.com>
On Fri, 2015-03-27 at 00:28 -0500, Steve French wrote:
> Although unlikely to fail (and tree connect does not commonly send
> a password since SECMODE_USER is the default for most servers)
> do not ignore errors on SMBNTEncrypt in SMB Tree Connect.
>
> Reported by Coverity (CID 1226853)
>
> Signed-off-by: Steve French <smfrench@gmail.com>
ACKed-by: Sachin Prabhu <sprabhu@redhat.com>
> ---
> fs/cifs/connect.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 4cb8450..cdb1aaf 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -3696,6 +3696,12 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
> #endif /* CIFS_WEAK_PW_HASH */
> rc = SMBNTencrypt(tcon->password, ses->server->cryptkey,
> bcc_ptr, nls_codepage);
> + if (rc) {
> + cifs_dbg(FYI, "%s Can't generate NTLM rsp. Error: %d\n",
> + __func__, rc);
> + cifs_buf_release(smb_buffer);
> + return rc;
> + }
>
> bcc_ptr += CIFS_AUTH_RESP_SIZE;
> if (ses->capabilities & CAP_UNICODE) {
next prev parent reply other threads:[~2015-03-30 9:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 5:27 [PATCH 0/4] Fix various coverity warnings in fs/cifs Steve French
2015-03-27 5:27 ` [PATCH 1/4] [SMB3] Fix warning on uninitialized buftype Steve French
2015-03-28 14:19 ` Shirish Pargaonkar
2015-03-30 9:36 ` Sachin Prabhu
2015-04-01 0:35 ` Jeff Layton
2015-03-27 5:28 ` [PATCH 2/4] [CIFS] Don't ignore errors on encrypting password in SMBTcon Steve French
2015-03-28 14:26 ` Shirish Pargaonkar
2015-03-30 9:44 ` Sachin Prabhu [this message]
2015-04-01 0:37 ` Jeff Layton
2015-03-27 5:28 ` [PATCH 3/4] [SMB3] Fix dereference before null check warning Steve French
2015-03-28 14:27 ` Shirish Pargaonkar
2015-03-30 9:50 ` Sachin Prabhu
2015-04-01 0:46 ` Jeff Layton
2015-04-01 5:00 ` Steve French
2015-04-01 11:07 ` Jeff Layton
2015-03-27 5:28 ` [PATCH 4/4] [SMB3] Fix coverity warning Steve French
2015-03-28 15:05 ` Shirish Pargaonkar
2015-03-30 9:51 ` Sachin Prabhu
2015-04-01 0:38 ` Jeff Layton
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=1427708644.14176.3.camel@redhat.com \
--to=sprabhu@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smfrench@gmail.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).