[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <07232902-0e64-fab5-c60c-570e7004d6c9@huawei.com>
Date: Fri, 21 Oct 2022 09:01:26 +0800
From: shangxiaojing <shangxiaojing@...wei.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: <acme@...hat.com>, <linux-kernel@...r.kernel.org>,
<namhyung@...nel.org>
Subject: Re: [PATCH] tools lib traceevent: Fix double free in
event_read_fields()
On 2022/10/21 5:23, Steven Rostedt wrote:
> On Mon, 17 Oct 2022 16:59:37 +0800
> Shang XiaoJing <shangxiaojing@...wei.com> wrote:
>
>> There is a double free in event_read_fields(). After calling free_token()
>> to free the token, if append() failed, then goto fail, which will call
>> free_token() again. Triggered by compiling with perf and run "perf sched
>> record". Fix the double free by goto fail_expect instead of fail while
>> append() failed, which won't call redundant free_token().
>>
>> BUG: double free
>> free(): double free detected in tcache 2
>> Aborted
>>
>> Fixes: d286447f23cd ("tools lib traceevent: Handle realloc() failure path")
>> Signed-off-by: Shang XiaoJing <shangxiaojing@...wei.com>
>> ---
>> tools/lib/traceevent/event-parse.c | 2 +-
>
> tool/lib/traceevent is deprecated.
>
> Can you send this patch to linux-trace-devel@...r.kernel.org against
>
> https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
>
ok, thanks for the reminder.
Thanks,
--
Shang XiaoJing
Powered by blists - more mailing lists