linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Namjae Jeon <namjae.jeon@samsung.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steve French <sfrench@samba.org>,
	Hyunchul Lee <hyc.lee@gmail.com>,
	linux-cifs@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ksmbd: Fix read on the uninitialized pointer sess
Date: Tue, 6 Jul 2021 21:43:58 +0900	[thread overview]
Message-ID: <CAKYAXd9=fQv2jqSUkeavnccvTd8n5ShpCW=jFC5ikx_=Bo=G3A@mail.gmail.com> (raw)
In-Reply-To: <20210706120501.28776-1-colin.king@canonical.com>

Hi Colin,

2021-07-06 21:05 GMT+09:00, Colin King <colin.king@canonical.com>:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a error handling case that passes control to label out_err
> without pointer sess being assigned a value. The unassigned pointer
> may be any garbage value and so the test of rc < 0 && sess maybe
> true leading to sess being passed to the call to ksmbd_session_destroy.
> Fix this by setting sess to NULL in this corner case.
>
> Addresses-Coverity: ("Uninitialized pointer read")
> Fixes: f5a544e3bab7 ("ksmbd: add support for SMB3 multichannel")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
I will apply this patch. Thanks for your patch!

      reply	other threads:[~2021-07-06 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 12:05 Colin King
2021-07-06 12:43 ` Namjae Jeon [this message]

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='CAKYAXd9=fQv2jqSUkeavnccvTd8n5ShpCW=jFC5ikx_=Bo=G3A@mail.gmail.com' \
    --to=linkinjeon@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=hyc.lee@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    --cc=senozhatsky@chromium.org \
    --cc=sfrench@samba.org \
    --subject='Re: [PATCH][next] ksmbd: Fix read on the uninitialized pointer sess' \
    /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

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).