]> 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:30:54 +0000 (10:30 +0100)
commit3d15f4c2449558ffe83b4dba30614ef1cd6937c3
tree012801603ebf1bebf9a2e83f8c79515bb16535ee
parentf2a16d2ba4a6e7e68ac8910d5ab950d8e921ad6c
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