From: Edward Adam Davis <eadavis@sina.com>
To: syzbot+237f670105a254a230d4@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kernel?] BUG: unable to handle kernel paging request in write_comp_data
Date: Tue, 15 Sep 2026 10:06:01 +0800 [thread overview]
Message-ID: <20260915020601.899434-1-eadavis@sina.com> (raw)
In-Reply-To: <6aa87111.f81106d8.2ab401.0057.GAE@google.com>
From: Edward Aadm Davis <eadavis@sina.com>
#syz test: upstream 704340f1cd0d
diff --git a/kernel/kcov.c b/kernel/kcov.c
index 35420f0ac524..479a84921833 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -236,7 +236,7 @@ static void notrace write_comp_data(u64 type, u64 arg1, u64 arg2, u64 ip)
{
struct task_struct *t;
u64 *area;
- u64 count, start_index, end_pos, max_pos;
+ u64 count, start_index, end_pos, max_pos, tmp;
t = current;
if (!check_kcov_mode(KCOV_MODE_TRACE_CMP, t))
@@ -254,7 +254,9 @@ static void notrace write_comp_data(u64 type, u64 arg1, u64 arg2, u64 ip)
count = READ_ONCE(area[0]);
/* Every record is KCOV_WORDS_PER_CMP 64-bit words. */
- start_index = 1 + count * KCOV_WORDS_PER_CMP;
+ if (check_mul_overflow(count, KCOV_WORDS_PER_CMP, &tmp))
+ return;
+ start_index = 1 + tmp;
end_pos = (start_index + KCOV_WORDS_PER_CMP) * sizeof(u64);
if (likely(end_pos <= max_pos)) {
/* See comment in __sanitizer_cov_trace_pc(). */
next prev parent reply other threads:[~2026-09-15 2:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 4:52 syzbot
2026-09-14 22:11 ` syzbot
2026-09-15 2:06 ` Edward Adam Davis [this message]
2026-09-15 3:24 ` syzbot
2026-09-15 3:33 ` [PATCH] kcov: add a missing bound check in write_comp_data() Edward Adam Davis
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=20260915020601.899434-1-eadavis@sina.com \
--to=eadavis@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+237f670105a254a230d4@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®