syzbot


kernel panic: corrupted stack end in lo_ioctl

Status: fixed on 2023/02/24 13:50
Subsystems: fs mm
[Documentation on labels]
Fix commit: b81d591386c3 riscv: Increase stack size under KASAN
First crash: 581d, last: 459d

Sample crash report:
Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 0 PID: 3636 Comm: syz-executor.0 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0
Hardware name: riscv-virtio,qemu (DT)
Call Trace:
[<ffffffff8000a228>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113
[<ffffffff831668cc>] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119
[<ffffffff831756ba>] __dump_stack lib/dump_stack.c:88 [inline]
[<ffffffff831756ba>] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106
[<ffffffff83175742>] dump_stack+0x1c/0x24 lib/dump_stack.c:113
[<ffffffff83166fa8>] panic+0x24a/0x634 kernel/panic.c:233
[<ffffffff831a688a>] schedule_debug kernel/sched/core.c:5541 [inline]
[<ffffffff831a688a>] schedule+0x0/0x14c kernel/sched/core.c:6187
[<ffffffff831a6b00>] preempt_schedule_common+0x4e/0xde kernel/sched/core.c:6462
[<ffffffff831a6bc4>] preempt_schedule+0x34/0x36 kernel/sched/core.c:6487
[<ffffffff831afd78>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
[<ffffffff831afd78>] _raw_spin_unlock_irqrestore+0x8c/0x98 kernel/locking/spinlock.c:194
[<ffffffff80c009de>] __stack_depot_save+0x384/0x4b2 lib/stackdepot.c:423
[<ffffffff80c00b1a>] stack_depot_save+0xe/0x18 lib/stackdepot.c:452
[<ffffffff8049a472>] save_stack+0x122/0x16c mm/page_owner.c:122
[<ffffffff8049adc2>] __set_page_owner+0x48/0x136 mm/page_owner.c:183
[<ffffffff80412f7a>] set_page_owner include/linux/page_owner.h:31 [inline]
[<ffffffff80412f7a>] post_alloc_hook+0xd0/0x10a mm/page_alloc.c:2427
[<ffffffff80416a5c>] prep_new_page mm/page_alloc.c:2434 [inline]
[<ffffffff80416a5c>] get_page_from_freelist+0x8da/0x12d8 mm/page_alloc.c:4165
[<ffffffff80418efa>] __alloc_pages+0x150/0x3b6 mm/page_alloc.c:5389
[<ffffffff8045746a>] alloc_pages+0x132/0x2a6 mm/mempolicy.c:2271
[<ffffffff8046a97e>] alloc_slab_page.constprop.0+0xc2/0xfa mm/slub.c:1799
[<ffffffff8046b38a>] allocate_slab mm/slub.c:1944 [inline]
[<ffffffff8046b38a>] new_slab+0x25a/0x2cc mm/slub.c:2004
[<ffffffff8046e7ac>] ___slab_alloc+0x56e/0x918 mm/slub.c:3018
[<ffffffff8046ef1c>] __slab_alloc.constprop.0+0x50/0x8c mm/slub.c:3105
[<ffffffff80470120>] slab_alloc_node mm/slub.c:3196 [inline]
[<ffffffff80470120>] kmem_cache_alloc_node+0x1f2/0x41c mm/slub.c:3266
[<ffffffff80096f78>] alloc_unbound_pwq+0x354/0x816 kernel/workqueue.c:3858
[<ffffffff800979d6>] apply_wqattrs_prepare+0x1fa/0x5c0 kernel/workqueue.c:4003
[<ffffffff80097e38>] apply_workqueue_attrs_locked+0x9c/0xf0 kernel/workqueue.c:4086
[<ffffffff8009d14a>] apply_workqueue_attrs kernel/workqueue.c:4123 [inline]
[<ffffffff8009d14a>] alloc_and_link_pwqs kernel/workqueue.c:4247 [inline]
[<ffffffff8009d14a>] alloc_workqueue+0x7d8/0x92e kernel/workqueue.c:4355
[<ffffffff8143dadc>] loop_configure+0x52c/0xee8 drivers/block/loop.c:1009
[<ffffffff814420c2>] lo_ioctl+0x236/0x100c drivers/block/loop.c:1545
[<ffffffff80a50ba4>] blkdev_ioctl+0x392/0x1526 block/ioctl.c:588
[<ffffffff804f6ff8>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff804f6ff8>] __do_sys_ioctl fs/ioctl.c:874 [inline]
[<ffffffff804f6ff8>] sys_ioctl+0x75c/0x139e fs/ioctl.c:860
[<ffffffff80005716>] ret_from_syscall+0x0/0x2
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/18 05:35 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d d02e9a70 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in lo_ioctl
2023/02/04 01:12 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 1b2f701a .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in lo_ioctl
2022/11/30 12:48 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 4c2a66e8 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in lo_ioctl
2022/10/19 09:21 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d b31320fc .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in lo_ioctl
* Struck through repros no longer work on HEAD.