From: piaojun <piaojun@huawei.com>
To: Tomas Bortoli <tomasbortoli@gmail.com>, <ericvh@gmail.com>,
<rminnich@sandia.gov>, <lucho@ionkov.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<syzkaller@googlegroups.com>,
<v9fs-developer@lists.sourceforge.net>, <davem@davemloft.net>
Subject: Re: [V9fs-developer] [PATCH] version pointer uninitialized
Date: Tue, 10 Jul 2018 09:02:56 +0800 [thread overview]
Message-ID: <5B4405C0.3060705@huawei.com> (raw)
In-Reply-To: <20180709222943.19503-1-tomasbortoli@gmail.com>
LGTM
On 2018/7/10 6:29, Tomas Bortoli wrote:
> The p9_client_version() does not initialize the version
> pointer. If the call to p9pdu_readf() returns an error and version has not
> been allocated in p9pdu_readf(), then the program will jump to the "error"
> label and will try to free the version pointer. If version is not
> initialized, free() will be called with uninitialized, garbage data and
> will provoke a crash.
>
> Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com>
> Reported-by: syzbot+65c6b72f284a39d416b4@syzkaller.appspotmail.com
Reviewed-by: Jun Piao <piaojun@huawei.com>
> ---
> net/9p/client.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/9p/client.c b/net/9p/client.c
> index 18c5271910dc..40f7c47f2f74 100644
> --- a/net/9p/client.c
> +++ b/net/9p/client.c
> @@ -957,7 +957,7 @@ static int p9_client_version(struct p9_client *c)
> {
> int err = 0;
> struct p9_req_t *req;
> - char *version;
> + char *version = NULL;
> int msize;
>
> p9_debug(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n",
>
next prev parent reply other threads:[~2018-07-10 1:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 22:29 [V9fs-developer] [PATCH] version pointer uninitialized Tomas Bortoli
2018-07-10 1:02 ` piaojun [this message]
2018-07-11 1:26 ` jiangyiwen
2018-07-12 16:44 ` Tomas Bortoli
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=5B4405C0.3060705@huawei.com \
--to=piaojun@huawei.com \
--cc=davem@davemloft.net \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=netdev@vger.kernel.org \
--cc=rminnich@sandia.gov \
--cc=syzkaller@googlegroups.com \
--cc=tomasbortoli@gmail.com \
--cc=v9fs-developer@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.