task:syz-executor.0 state:R running task stack:0 pid:28565 tgid:28565 ppid:3023 flags:0x00000002 Call Trace: [] context_switch kernel/sched/core.c:5400 [inline] [] __schedule+0xc40/0x3196 kernel/sched/core.c:6727 ================================================================== BUG: KASAN: stack-out-of-bounds in walk_stackframe+0x396/0x410 arch/riscv/kernel/stacktrace.c:58 Read of size 8 at addr ff200000077c39d0 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.8.0-rc1-syzkaller-00011-g58506612bf02 #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:121 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:127 [] __dump_stack lib/dump_stack.c:88 [inline] [] dump_stack_lvl+0xe8/0x154 lib/dump_stack.c:106 [] print_address_description mm/kasan/report.c:377 [inline] [] print_report+0x26e/0x57e mm/kasan/report.c:488 [] kasan_report+0xf0/0x1b8 mm/kasan/report.c:601 [] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381 [] walk_stackframe+0x396/0x410 arch/riscv/kernel/stacktrace.c:58 [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:121 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:127 [] sched_show_task kernel/sched/core.c:9171 [inline] [] sched_show_task+0x446/0x5c0 kernel/sched/core.c:9145 [] show_state_filter+0xcc/0x28e kernel/sched/core.c:9216 [] show_state include/linux/sched/debug.h:21 [inline] [] fn_show_state+0x1a/0x22 drivers/tty/vt/keyboard.c:614 [] k_spec drivers/tty/vt/keyboard.c:667 [inline] [] k_spec+0xf8/0x140 drivers/tty/vt/keyboard.c:656 [] kbd_keycode drivers/tty/vt/keyboard.c:1524 [inline] [] kbd_event+0x856/0xf54 drivers/tty/vt/keyboard.c:1543 [] input_to_handler+0x374/0x466 drivers/input/input.c:132 [] input_pass_values+0x54a/0x7d0 drivers/input/input.c:161 [] input_event_dispose+0x4a0/0x5a0 drivers/input/input.c:389 [] input_handle_event+0x11e/0xc9e drivers/input/input.c:406 [] input_event drivers/input/input.c:435 [inline] [] input_event+0x96/0xc8 drivers/input/input.c:427 [] hidinput_hid_event+0x7d0/0x238e drivers/hid/hid-input.c:1731 [] hid_process_event+0x48a/0x59e drivers/hid/hid-core.c:1541 [] hid_input_array_field+0x2e8/0x66a drivers/hid/hid-core.c:1645 [] hid_process_report drivers/hid/hid-core.c:1695 [inline] [] hid_report_raw_event+0x9ce/0x10a6 drivers/hid/hid-core.c:2016 [] hid_input_report+0x2f6/0x3fa drivers/hid/hid-core.c:2090 [] hid_irq_in+0x31c/0x6d0 drivers/hid/usbhid/hid-core.c:284 [] __usb_hcd_giveback_urb+0x34a/0x5d4 drivers/usb/core/hcd.c:1650 [] usb_hcd_giveback_urb+0x35a/0x3fc drivers/usb/core/hcd.c:1733 [] dummy_timer+0x1318/0x3348 drivers/usb/gadget/udc/dummy_hcd.c:1987 [] call_timer_fn+0x1cc/0x7fe kernel/time/timer.c:1700 [] expire_timers kernel/time/timer.c:1751 [inline] [] __run_timers+0x830/0xae0 kernel/time/timer.c:2038 [] run_timer_softirq+0x56/0xb6 kernel/time/timer.c:2051 [] __do_softirq+0x480/0xfe2 kernel/softirq.c:553 [] invoke_softirq kernel/softirq.c:427 [inline] [] __irq_exit_rcu kernel/softirq.c:632 [inline] [] irq_exit_rcu+0x220/0x3c2 kernel/softirq.c:644 [] handle_riscv_irq+0x40/0x4c arch/riscv/kernel/traps.c:363 [] call_on_irq_stack+0x32/0x40 arch/riscv/kernel/entry.S:258 The buggy address belongs to the virtual mapping at [ff200000077c0000, ff200000077c5000) created by: kernel_clone+0x11e/0xa16 kernel/fork.c:2901 The buggy address belongs to the physical page: page:ff1c00000265c5c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x99717 memcg:ff600000176eb602 flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 0ffe000000000000 0000000000000000 0000000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ff600000176eb602 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 10788, tgid 10788 (kworker/u5:5), ts 6980418629300, free_ts 6319794150200 __set_page_owner+0x32/0x31e mm/page_owner.c:195 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x9c/0xfc mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x882/0x23e8 mm/page_alloc.c:3311 __alloc_pages+0x1ee/0x2032 mm/page_alloc.c:4567 alloc_pages_mpol+0xf8/0x46e mm/mempolicy.c:2133 alloc_pages+0x1f6/0x246 mm/mempolicy.c:2204 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x968/0x1316 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:307 [inline] dup_task_struct kernel/fork.c:1112 [inline] copy_process+0x2c2a/0x6b54 kernel/fork.c:2326 kernel_clone+0x11e/0xa16 kernel/fork.c:2901 user_mode_thread+0xea/0x11a kernel/fork.c:2979 call_usermodehelper_exec_work kernel/umh.c:172 [inline] call_usermodehelper_exec_work+0xd4/0x1ac kernel/umh.c:158 process_one_work+0x7ce/0x179c kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0xadc/0x10f8 kernel/workqueue.c:2787 kthread+0x28c/0x3a6 kernel/kthread.c:388 ret_from_fork+0xe/0x1c arch/riscv/kernel/entry.S:229 page last free pid 20261 tgid 20261 stack trace: __reset_page_owner+0x54/0x20c mm/page_owner.c:150 reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x3d0/0xae2 mm/page_alloc.c:2346 free_unref_page+0x90/0x422 mm/page_alloc.c:2486 free_the_page mm/page_alloc.c:563 [inline] __free_pages+0x152/0x190 mm/page_alloc.c:4653 free_pages.part.0+0xba/0x138 mm/page_alloc.c:4664 free_pages+0xe/0x18 mm/page_alloc.c:4661 kasan_depopulate_vmalloc_pte+0x4a/0x70 mm/kasan/shadow.c:415 apply_to_pte_range mm/memory.c:2619 [inline] apply_to_pmd_range mm/memory.c:2663 [inline] apply_to_pud_range mm/memory.c:2699 [inline] apply_to_p4d_range mm/memory.c:2735 [inline] __apply_to_page_range+0x636/0x12ae mm/memory.c:2769 apply_to_existing_page_range+0x34/0x46 mm/memory.c:2802 kasan_release_vmalloc+0xa2/0xba mm/kasan/shadow.c:532 __purge_vmap_area_lazy+0x8a4/0x1e90 mm/vmalloc.c:1770 drain_vmap_area_work+0x3c/0x7e mm/vmalloc.c:1804 process_one_work+0x7ce/0x179c kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0xadc/0x10f8 kernel/workqueue.c:2787 kthread+0x28c/0x3a6 kernel/kthread.c:388 ret_from_fork+0xe/0x1c arch/riscv/kernel/entry.S:229 Memory state around the buggy address: ff200000077c3880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff200000077c3900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ff200000077c3980: 00 00 f2 f2 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 ^ ff200000077c3a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff200000077c3a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================