syzbot


kernel panic: corrupted stack end in packet_sendmsg

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

Sample crash report:
Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 0 PID: 3002 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
[<ffffffff80b09fdc>] __debug_check_no_obj_freed lib/debugobjects.c:1002 [inline]
[<ffffffff80b09fdc>] debug_check_no_obj_freed+0x14c/0x24a lib/debugobjects.c:1023
[<ffffffff80410994>] free_pages_prepare mm/page_alloc.c:1358 [inline]
[<ffffffff80410994>] free_pcp_prepare+0x24e/0x45e mm/page_alloc.c:1404
[<ffffffff804142fe>] free_unref_page_prepare mm/page_alloc.c:3325 [inline]
[<ffffffff804142fe>] free_unref_page+0x6a/0x31e mm/page_alloc.c:3404
[<ffffffff8041471e>] free_the_page mm/page_alloc.c:706 [inline]
[<ffffffff8041471e>] __free_pages+0xe2/0x112 mm/page_alloc.c:5474
[<ffffffff8046d728>] __free_slab+0x122/0x27c mm/slub.c:2028
[<ffffffff8046d8ce>] free_slab mm/slub.c:2043 [inline]
[<ffffffff8046d8ce>] discard_slab+0x4c/0x7a mm/slub.c:2049
[<ffffffff8046deec>] __unfreeze_partials+0x16a/0x18e mm/slub.c:2536
[<ffffffff8046e006>] put_cpu_partial+0xf6/0x162 mm/slub.c:2612
[<ffffffff8046d0ec>] __slab_free+0x166/0x29c mm/slub.c:3378
[<ffffffff8047258c>] do_slab_free mm/slub.c:3497 [inline]
[<ffffffff8047258c>] ___cache_free+0x17c/0x354 mm/slub.c:3516
[<ffffffff8047692e>] qlink_free mm/kasan/quarantine.c:157 [inline]
[<ffffffff8047692e>] qlist_free_all+0x7c/0x132 mm/kasan/quarantine.c:176
[<ffffffff80476ed4>] kasan_quarantine_reduce+0x14c/0x1c8 mm/kasan/quarantine.c:283
[<ffffffff804742b2>] __kasan_slab_alloc+0x5c/0x98 mm/kasan/common.c:446
[<ffffffff80470296>] kasan_slab_alloc include/linux/kasan.h:260 [inline]
[<ffffffff80470296>] slab_post_alloc_hook mm/slab.h:732 [inline]
[<ffffffff80470296>] slab_alloc_node mm/slub.c:3230 [inline]
[<ffffffff80470296>] kmem_cache_alloc_node+0x368/0x41c mm/slub.c:3266
[<ffffffff826ed85a>] __alloc_skb+0x234/0x2e4 net/core/skbuff.c:414
[<ffffffff826f69ba>] alloc_skb include/linux/skbuff.h:1158 [inline]
[<ffffffff826f69ba>] alloc_skb_with_frags+0x78/0x30c net/core/skbuff.c:5956
[<ffffffff826de51e>] sock_alloc_send_pskb+0x536/0x558 net/core/sock.c:2586
[<ffffffff82e88044>] packet_alloc_skb net/packet/af_packet.c:2901 [inline]
[<ffffffff82e88044>] packet_snd net/packet/af_packet.c:2996 [inline]
[<ffffffff82e88044>] packet_sendmsg+0x110a/0x2c8c net/packet/af_packet.c:3080
[<ffffffff826d264e>] sock_sendmsg_nosec net/socket.c:705 [inline]
[<ffffffff826d264e>] sock_sendmsg+0xa0/0xc4 net/socket.c:725
[<ffffffff826d4b34>] ____sys_sendmsg+0x1ce/0x484 net/socket.c:2413
[<ffffffff826d8bca>] ___sys_sendmsg+0x16c/0x1f6 net/socket.c:2467
[<ffffffff826d90f2>] __sys_sendmmsg+0x1aa/0x43a net/socket.c:2553
[<ffffffff826d93b6>] __do_sys_sendmmsg net/socket.c:2582 [inline]
[<ffffffff826d93b6>] sys_sendmmsg+0x34/0x44 net/socket.c:2579
[<ffffffff80005716>] ret_from_syscall+0x0/0x2
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/06 06:44 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 9dcd38fc .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in packet_sendmsg
* Struck through repros no longer work on HEAD.