From: syzbot <syzbot+0aecfd34fb878546f3fd@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [trace?] WARNING in bitmap_parse_user
Date: Sun, 15 Dec 2024 17:56:32 -0800 [thread overview]
Message-ID: <675f88d0.050a0220.37aaf.010e.GAE@google.com> (raw)
In-Reply-To: <675f60b1.050a0220.37aaf.0107.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [trace?] WARNING in bitmap_parse_user
Author: lizhi.xu@windriver.com
User input a too large count 0x40fdef, it will triger a warning in bitmap_parse_user.
#syz test
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index be62f0ea1814..9e989d97bb78 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5224,6 +5224,8 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
struct trace_array *tr = file_inode(filp)->i_private;
cpumask_var_t tracing_cpumask_new;
int err;
+ if (count == 0 || count << PAGE_SHIFT > MAX_PAGE_ORDER)
+ return -EINVAL;
if (!zalloc_cpumask_var(&tracing_cpumask_new, GFP_KERNEL))
return -ENOMEM;
next prev parent reply other threads:[~2024-12-16 1:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 23:05 [syzbot] [trace?] WARNING in bitmap_parse_user syzbot
2024-12-16 0:55 ` [syzbot] " syzbot
2024-12-16 1:56 ` syzbot [this message]
2024-12-16 2:27 ` [PATCH] tracing: Prevent bad count for tracing_cpumask_write Lizhi Xu
2024-12-16 7:32 ` [PATCH V2] " Lizhi Xu
2024-12-16 12:28 ` [syzbot] [trace?] WARNING in bitmap_parse_user Edward Adam Davis
2024-12-16 12:49 ` syzbot
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=675f88d0.050a0220.37aaf.010e.GAE@google.com \
--to=syzbot+0aecfd34fb878546f3fd@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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.