task:klogd state:R running task stack:0 pid:2990 tgid:2990 ppid:1 task_flags:0x400100 flags:0x00000000 Call Trace: [] context_switch kernel/sched/core.c:5396 [inline] [] __schedule+0x1022/0x4094 kernel/sched/core.c:6785 ================================================================== BUG: KASAN: stack-out-of-bounds in walk_stackframe+0x3e0/0x44e arch/riscv/kernel/stacktrace.c:67 Read of size 8 at addr ffff8f80075d7958 by task ksoftirqd/1/23 CPU: 1 UID: 0 PID: 23 Comm: ksoftirqd/1 Not tainted 6.16.0-rc1-syzkaller-00006-gfda589c28604 #0 PREEMPT Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [] print_address_description mm/kasan/report.c:408 [inline] [] print_report+0x28e/0x5fe mm/kasan/report.c:521 [] kasan_report+0xf0/0x214 mm/kasan/report.c:634 [] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381 [] walk_stackframe+0x3e0/0x44e arch/riscv/kernel/stacktrace.c:67 [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [] sched_show_task kernel/sched/core.c:7753 [inline] [] sched_show_task+0x460/0x61c kernel/sched/core.c:7728 [] show_state_filter+0xcc/0x302 kernel/sched/core.c:7798 [] show_state include/linux/sched/debug.h:21 [inline] [] fn_show_state+0x1a/0x22 drivers/tty/vt/keyboard.c:613 [] k_spec drivers/tty/vt/keyboard.c:666 [inline] [] k_spec+0x102/0x16c drivers/tty/vt/keyboard.c:655 [] kbd_keycode drivers/tty/vt/keyboard.c:1515 [inline] [] kbd_event+0x8ac/0x1056 drivers/tty/vt/keyboard.c:1534 [] input_handle_events_default+0xfe/0x174 drivers/input/input.c:2575 [] input_pass_values+0x660/0x7f8 drivers/input/input.c:127 [] input_event_dispose drivers/input/input.c:341 [inline] [] input_handle_event+0x232/0x13e6 drivers/input/input.c:369 [] input_event drivers/input/input.c:395 [inline] [] input_event+0x96/0xd2 drivers/input/input.c:390 [] input_sync include/linux/input.h:464 [inline] [] hidinput_report_event+0xc0/0x114 drivers/hid/hid-input.c:1733 [] hid_report_raw_event+0x26e/0x1146 drivers/hid/hid-core.c:2059 [] __hid_input_report.constprop.0+0x2f6/0x3fa drivers/hid/hid-core.c:2122 [] hid_input_report+0x32/0x44 drivers/hid/hid-core.c:2144 [] hid_irq_in+0x2f6/0x732 drivers/hid/usbhid/hid-core.c:286 [] __usb_hcd_giveback_urb+0x362/0x6f4 drivers/usb/core/hcd.c:1650 [] usb_hcd_giveback_urb+0x364/0x3fe drivers/usb/core/hcd.c:1734 [] dummy_timer+0x134a/0x3458 drivers/usb/gadget/udc/dummy_hcd.c:1995 [] __run_hrtimer kernel/time/hrtimer.c:1761 [inline] [] __hrtimer_run_queues+0x1bc/0xfba kernel/time/hrtimer.c:1825 [] hrtimer_run_softirq+0x144/0x2f6 kernel/time/hrtimer.c:1842 [] handle_softirqs+0x4b2/0x132e kernel/softirq.c:579 [] run_ksoftirqd kernel/softirq.c:968 [inline] [] run_ksoftirqd+0xce/0x144 kernel/softirq.c:960 [] smpboot_thread_fn+0x420/0xc80 kernel/smpboot.c:164 [] kthread+0x39c/0x7d4 kernel/kthread.c:464 [] ret_from_fork_kernel+0x2a/0xbb2 arch/riscv/kernel/process.c:214 [] ret_from_fork_kernel_asm+0x16/0x18 arch/riscv/kernel/entry.S:327 The buggy address belongs to the virtual mapping at [ffff8f80075d0000, ffff8f80075d9000) created by: kernel_clone+0x128/0xc9e kernel/fork.c:2599 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9e0ed flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 0ffe000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 2989, tgid 2989 (start-stop-daem), ts 158759327300, free_ts 0 __set_page_owner+0x94/0x4a8 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xdc/0x1ba mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x880/0x3660 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x22e/0x2124 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fa/0x5ba mm/mempolicy.c:2419 alloc_frozen_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2490 alloc_pages_noprof+0x20/0x48 mm/mempolicy.c:2510 vm_area_alloc_pages mm/vmalloc.c:3634 [inline] __vmalloc_area_node mm/vmalloc.c:3712 [inline] __vmalloc_node_range_noprof+0x624/0x11b0 mm/vmalloc.c:3885 __vmalloc_node_noprof+0x104/0x136 mm/vmalloc.c:3948 alloc_thread_stack_node kernel/fork.c:317 [inline] dup_task_struct kernel/fork.c:877 [inline] copy_process+0x32ec/0x716a kernel/fork.c:1999 kernel_clone+0x128/0xc9e kernel/fork.c:2599 __do_sys_clone+0xfe/0x13e kernel/fork.c:2742 __se_sys_clone kernel/fork.c:2710 [inline] __riscv_sys_clone+0xa0/0x10e kernel/fork.c:2710 syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112 do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:341 handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:197 page_owner free stack trace missing Memory state around the buggy address: ffff8f80075d7800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f80075d7880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8f80075d7900: f1 f1 f1 f1 f1 f1 04 f2 00 00 00 f3 f3 f3 f3 f3 ^ ffff8f80075d7980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f80075d7a00: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 ==================================================================