]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: Prevent bad count for tracing_cpumask_write
authorLizhi Xu <lizhi.xu@windriver.com>
Mon, 16 Dec 2024 07:32:38 +0000 (15:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:34:22 +0000 (10:34 +0100)
commit1cca920af19df5dd91254e5ff35e68e911683706
tree05c858facc1c930381ffc8b7c2d621f2eb448271
parenta744146969a0ec8d949aad06889243ad97927a17
tracing: Prevent bad count for tracing_cpumask_write

commit 98feccbf32cfdde8c722bc4587aaa60ee5ac33f0 upstream.

If a large count is provided, it will trigger a warning in bitmap_parse_user.
Also check zero for it.

Cc: stable@vger.kernel.org
Fixes: 9e01c1b74c953 ("cpumask: convert kernel trace functions")
Link: https://lore.kernel.org/20241216073238.2573704-1-lizhi.xu@windriver.com
Reported-by: syzbot+0aecfd34fb878546f3fd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=0aecfd34fb878546f3fd
Tested-by: syzbot+0aecfd34fb878546f3fd@syzkaller.appspotmail.com
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c