syzbot


kernel panic: stack is corrupted in __kmalloc

Status: internal: reported on 2022/06/10 15:38
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: 241d, last: 15d

Sample crash report:
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __kmalloc+0x318/0x318 mm/slub.c:4427
CPU: 1 PID: 2054 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
[<ffffffff831a1392>] warn_bogus_irq_restore+0x0/0x34 kernel/panic.c:670
[<ffffffff8046fc4c>] kmem_cache_alloc_node_trace+0x0/0x2e2 mm/slub.c:4427
[<ffffffff803938e6>] kmemdup+0x2a/0x5a mm/util.c:128
[<ffffffff82f32576>] sctp_addr_wq_mgmt+0x37a/0x4f0 net/sctp/protocol.c:751
[<ffffffff82f99226>] sctp_inet6addr_event+0x4b8/0x4c4 net/sctp/ipv6.c:94
[<ffffffff800aac84>] notifier_call_chain+0xb8/0x188 kernel/notifier.c:84
[<ffffffff800ab6da>] atomic_notifier_call_chain+0x76/0x1a8 kernel/notifier.c:199
[<ffffffff82e7557c>] inet6addr_notifier_call_chain+0x2c/0x38 net/ipv6/addrconf_core.c:109
[<ffffffff82d3df52>] ipv6_add_addr+0xee6/0x12f2 net/ipv6/addrconf.c:1161
[<ffffffff82d46ac2>] inet6_addr_add+0x284/0x646 net/ipv6/addrconf.c:2954
[<ffffffff82d4ac8c>] inet6_rtm_newaddr+0x948/0xf4a net/ipv6/addrconf.c:4892
[<ffffffff8276b46c>] rtnetlink_rcv_msg+0x338/0x9a0 net/core/rtnetlink.c:5592
[<ffffffff8296ded2>] netlink_rcv_skb+0xf8/0x2be net/netlink/af_netlink.c:2494
[<ffffffff827624f4>] rtnetlink_rcv+0x26/0x30 net/core/rtnetlink.c:5610
[<ffffffff8296cbcc>] netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
[<ffffffff8296cbcc>] netlink_unicast+0x40e/0x5fe net/netlink/af_netlink.c:1343
[<ffffffff8296d29c>] netlink_sendmsg+0x4e0/0x994 net/netlink/af_netlink.c:1919
[<ffffffff826d264e>] sock_sendmsg_nosec net/socket.c:705 [inline]
[<ffffffff826d264e>] sock_sendmsg+0xa0/0xc4 net/socket.c:725
[<ffffffff826d7026>] __sys_sendto+0x1f2/0x2e0 net/socket.c:2040
[<ffffffff826d7152>] __do_sys_sendto net/socket.c:2052 [inline]
[<ffffffff826d7152>] sys_sendto+0x3e/0x52 net/socket.c:2048
[<ffffffff80005716>] ret_from_syscall+0x0/0x2
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-qemu2-riscv64 2023/01/22 04:41 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 7374c4e5 .config console log report info kernel panic: stack is corrupted in __kmalloc
ci-qemu2-riscv64 2022/08/08 04:45 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 88e3a122 .config console log report info kernel panic: stack is corrupted in __kmalloc
ci-qemu2-riscv64 2022/06/10 15:37 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 0d5abf15 .config console log report info kernel panic: stack is corrupted in __kmalloc
* Struck through repros no longer work on HEAD.