From: Steven Rostedt <rostedt@goodmis.org>
To: Liangyan <liangyan.peng@linux.alibaba.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Xunlei Pang <xlpang@linux.alibaba.com>,
yinbinbin@alibabacloud.com, wetp <wetp.zy@linux.alibaba.com>,
jnwang@linux.alibaba.com, stable@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] tracing: Correct the length check which causes memory corruption
Date: Mon, 7 Jun 2021 11:34:16 -0400 [thread overview]
Message-ID: <20210607113416.603c72d3@oasis.local.home> (raw)
In-Reply-To: <20210607125734.1770447-1-liangyan.peng@linux.alibaba.com>
On Mon, 7 Jun 2021 20:57:34 +0800
Liangyan <liangyan.peng@linux.alibaba.com> wrote:
> commit b220c049d519 ("tracing: Check length before giving out
> the filter buffer") adds length check to protect trace data
> overflow introduced in 0fc1b09ff1ff, seems that this fix can't prevent
> overflow entirely, the length check should also take the sizeof
> entry->array[0] into account, since this array[0] is filled the
> length of trace data and occupy addtional space and risk overflow.
Bah, you're right! I didn't take into account that when the event is
this big, array[] will have content.
I queued the patch and will start testing it.
Thanks!
-- Steve
prev parent reply other threads:[~2021-06-07 15:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 12:57 [PATCH] tracing: Correct the length check which causes memory corruption Liangyan
2021-06-07 13:46 ` James Wang
2021-06-09 20:08 ` Linus Torvalds
2021-06-09 20:51 ` Steven Rostedt
2021-06-09 20:55 ` Linus Torvalds
2021-06-09 21:11 ` Steven Rostedt
2021-06-09 21:43 ` Linus Torvalds
2021-06-09 22:18 ` Steven Rostedt
2021-06-07 15:34 ` Steven Rostedt [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=20210607113416.603c72d3@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=gregkh@linuxfoundation.org \
--cc=jnwang@linux.alibaba.com \
--cc=liangyan.peng@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@vger.kernel.org \
--cc=wetp.zy@linux.alibaba.com \
--cc=xlpang@linux.alibaba.com \
--cc=yinbinbin@alibabacloud.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