syzbot


kernel panic: corrupted stack end in dput (2)

Status: internal: reported on 2022/11/17 16:25
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: b81d591386c3 riscv: Increase stack size under KASAN
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 79d, last: 79d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel panic: corrupted stack end in dput syz done 1 1315d 1315d 13/24 fixed on 2019/08/27 17:15

Sample crash report:
Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 0 PID: 4179 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
[<ffffffff831a6c62>] preempt_schedule_notrace+0x9c/0x19a kernel/sched/core.c:6541
[<ffffffff80469e2e>] rcu_read_unlock_sched_notrace include/linux/rcupdate.h:816 [inline]
[<ffffffff80469e2e>] trace_kmalloc include/trace/events/kmem.h:46 [inline]
[<ffffffff80469e2e>] trace_kmalloc+0x76/0x120 include/trace/events/kmem.h:46
[<ffffffff8046fab8>] __kmalloc+0x184/0x318 mm/slub.c:4422
[<ffffffff806dc9b8>] kmalloc_array+0x4e/0x6e include/linux/slab.h:621
[<ffffffff806e164e>] kcalloc include/linux/slab.h:652 [inline]
[<ffffffff806e164e>] ext4_find_extent+0x690/0x77c fs/ext4/extents.c:905
[<ffffffff806e920e>] ext4_ext_map_blocks+0x1fa/0x3e86 fs/ext4/extents.c:4098
[<ffffffff8071fc44>] ext4_map_blocks+0x4fe/0xe64 fs/ext4/inode.c:638
[<ffffffff80729e24>] mpage_map_one_extent fs/ext4/inode.c:2373 [inline]
[<ffffffff80729e24>] mpage_map_and_submit_extent fs/ext4/inode.c:2426 [inline]
[<ffffffff80729e24>] ext4_writepages+0x1114/0x2206 fs/ext4/inode.c:2778
[<ffffffff80355906>] do_writepages+0x16e/0x452 mm/page-writeback.c:2364
[<ffffffff8053f7d0>] __writeback_single_inode+0xea/0x1124 fs/fs-writeback.c:1618
[<ffffffff80542eba>] writeback_single_inode+0x1ca/0x2a2 fs/fs-writeback.c:1739
[<ffffffff805430ce>] write_inode_now+0x13c/0x174 fs/fs-writeback.c:2739
[<ffffffff8050c8c6>] iput_final fs/inode.c:1731 [inline]
[<ffffffff8050c8c6>] iput fs/inode.c:1770 [inline]
[<ffffffff8050c8c6>] iput+0x558/0x61c fs/inode.c:1756
[<ffffffff804fdf52>] dentry_unlink_inode+0x200/0x2b0 fs/dcache.c:401
[<ffffffff804ff9a6>] __dentry_kill+0x21e/0x3b6 fs/dcache.c:607
[<ffffffff80501b34>] dentry_kill fs/dcache.c:733 [inline]
[<ffffffff80501b34>] dput+0x610/0x9d6 fs/dcache.c:913
[<ffffffff804cb478>] __fput+0x21c/0x502 fs/file_table.c:324
[<ffffffff804cb7d2>] ____fput+0x1a/0x24 fs/file_table.c:344
[<ffffffff800a0530>] task_work_run+0xdc/0x154 kernel/task_work.c:164
[<ffffffff80008c12>] tracehook_notify_resume include/linux/tracehook.h:188 [inline]
[<ffffffff80008c12>] do_notify_resume+0x894/0xa56 arch/riscv/kernel/signal.c:320
[<ffffffff80005724>] ret_from_exception+0x0/0x10
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-qemu2-riscv64 2022/11/17 16:24 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 4ba8ab94 .config console log report info kernel panic: corrupted stack end in dput
* Struck through repros no longer work on HEAD.