From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+daba72c4af9915e9c894@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [trace?] KASAN: slab-use-after-free Read in __free_filter
Date: Tue, 24 Jun 2025 16:25:58 +0800 [thread overview]
Message-ID: <20250624082559.1616-1-hdanton@sina.com> (raw)
In-Reply-To: <6859ea24.a00a0220.2e5631.0044.GAE@google.com>
> Date: Mon, 23 Jun 2025 16:58:28 -0700
> syzbot found the following issue on:
>
> HEAD commit: 86731a2a651e Linux 6.16-rc3
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1611eb0c580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4ad206eb0100c6a2
> dashboard link: https://syzkaller.appspot.com/bug?extid=daba72c4af9915e9c894
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13b16dd4580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17c7bb0c580000
#syz test
--- x/kernel/trace/trace_events_filter.c
+++ y/kernel/trace/trace_events_filter.c
@@ -1429,6 +1429,7 @@ static void filter_free_subsystem_filter
struct trace_event_file *file;
struct filter_head *head;
struct filter_list *item;
+ int free_filter = 1;
head = kmalloc(sizeof(*head), GFP_KERNEL);
if (!head)
@@ -1442,6 +1443,7 @@ static void filter_free_subsystem_filter
item->filter = filter;
list_add_tail(&item->list, &head->list);
+ free_filter = 0;
list_for_each_entry(file, &tr->events, list) {
if (file->system != dir)
@@ -1467,7 +1469,8 @@ static void filter_free_subsystem_filter
continue;
__free_subsystem_filter(file);
}
- __free_filter(filter);
+ if (free_filter)
+ __free_filter(filter);
}
int filter_assign_type(const char *type)
--
next prev parent reply other threads:[~2025-06-24 8:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 23:58 syzbot
2025-06-24 6:10 ` Edward Adam Davis
2025-06-24 6:32 ` syzbot
2025-06-24 6:38 ` [PATCH] tracing: Fix filter logic error Edward Adam Davis
2025-06-24 7:44 ` Masami Hiramatsu
2025-06-24 19:17 ` Steven Rostedt
2025-06-24 8:25 ` Hillf Danton [this message]
2025-06-24 8:47 ` [syzbot] [trace?] KASAN: slab-use-after-free Read in __free_filter syzbot
2025-06-24 18:44 ` Steven Rostedt
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=20250624082559.1616-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+daba72c4af9915e9c894@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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
all inboxes | Powered by JetHome®