Re: [syzbot] KASAN: slab-out-of-bounds Read in riscv_intc_irq

From: Kefeng Wang
Date: Thu Mar 18 2021 - 10:51:02 EST

On 2021/3/18 22:11, Dmitry Vyukov wrote:
On Thu, Mar 18, 2021 at 1:21 PM Kefeng Wang <> wrote:
On 2021/3/14 18:47, Dmitry Vyukov wrote:
On Sun, Mar 14, 2021 at 11:14 AM syzbot
<syzbot+005654dd9b8f26bd4c07@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

syzbot found the following issue on:

HEAD commit: 0d7588ab riscv: process: Fix no prototype for arch_dup_tas..
git tree: git:// fixes
console output:
kernel config:
dashboard link:
userspace arch: riscv64

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+005654dd9b8f26bd4c07@xxxxxxxxxxxxxxxxxxxxxxxxx

BUG: KASAN: slab-out-of-bounds in riscv_intc_irq+0x24/0xcc drivers/irqchip/irq-riscv-intc.c:24
Read of size 8 at addr ffffffe00c963bd0 by task kworker/1:1/4388

CPU: 1 PID: 4388 Comm: kworker/1:1 Not tainted 5.12.0-rc2-syzkaller-00467-g0d7588ab9ef9 #0
Hardware name: riscv-virtio,qemu (DT)
Workqueue: events nsim_dev_trap_report_work
Call Trace:
[<ffffffe0000096c0>] walk_stackframe+0x0/0x23c arch/riscv/kernel/traps.c:201

Allocated by task 76347056:
(stack is not available)

Last potentially related work creation:
There seems to be some issue with riscv stack unwinder.
This does not have stacks.
Hi, could you test with the following patch about the no stack
issue(from v5.11-rc4), I made a mistake when do some cleanup...
Hi Kefeng,

Please see:

Is a unit-test for this possible? Fuzzing is not a replacement for unit testing.

ok, I mean that the issue about stack unwinder which may cause by my previous patch,

if some one want the stack back, it could try the bugfix.