[] __schedule_loop kernel/sched/core.c:6763 [inline] [] schedule+0x62/0x180 kernel/sched/core.c:6778 [] do_nanosleep+0x18a/0x318 kernel/time/hrtimer.c:2047 [] should_fail_ex+0x72/0x290 lib/fault-inject.c:125 ================================================================== BUG: KASAN: stack-out-of-bounds in walk_stackframe+0x120/0x2f2 arch/riscv/kernel/stacktrace.c:58 Read of size 8 at addr ff200000046fbc80 by task kworker/0:0/14071 CPU: 0 PID: 14071 Comm: kworker/0:0 Not tainted 6.7.0-rc1-syzkaller-gb8b2711336f0 #0 Hardware name: riscv-virtio,qemu (DT) Workqueue: events_power_efficient wg_ratelimiter_gc_entries 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:364 [inline] [] print_report+0x1e4/0x4f4 mm/kasan/report.c:475 [] kasan_report+0xf0/0x1b8 mm/kasan/report.c:588 [] check_region_inline mm/kasan/generic.c:181 [inline] [] __asan_load8+0x80/0xa8 mm/kasan/generic.c:260 [] walk_stackframe+0x120/0x2f2 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:9146 [inline] [] sched_show_task+0x310/0x426 kernel/sched/core.c:9120 [] show_state_filter+0xa0/0x1e0 kernel/sched/core.c:9191 [] 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+0xce/0x102 drivers/tty/vt/keyboard.c:656 [] kbd_keycode drivers/tty/vt/keyboard.c:1524 [inline] [] kbd_event+0x5fa/0xa5e drivers/tty/vt/keyboard.c:1543 [] input_to_handler+0x246/0x24c drivers/input/input.c:132 [] input_pass_values+0x410/0x5fe drivers/input/input.c:161 [] input_event_dispose+0x2b8/0x2c8 drivers/input/input.c:389 [] input_handle_event+0xf0/0x972 drivers/input/input.c:406 [] input_event drivers/input/input.c:435 [inline] [] input_event+0x8a/0xb2 drivers/input/input.c:427 [] hidinput_hid_event+0x54e/0x1438 drivers/hid/hid-input.c:1731 [] hid_process_event+0x348/0x38a drivers/hid/hid-core.c:1534 [] hid_input_array_field+0x348/0x404 drivers/hid/hid-core.c:1646 [] hid_process_report drivers/hid/hid-core.c:1688 [inline] [] hid_report_raw_event+0x744/0xa5c drivers/hid/hid-core.c:2009 [] hid_input_report+0x24e/0x2f4 drivers/hid/hid-core.c:2083 [] hid_irq_in+0x244/0x412 drivers/hid/usbhid/hid-core.c:284 [] __usb_hcd_giveback_urb+0x222/0x364 drivers/usb/core/hcd.c:1650 [] usb_hcd_giveback_urb+0x27a/0x290 drivers/usb/core/hcd.c:1733 [] dummy_timer+0xfc2/0x204a drivers/usb/gadget/udc/dummy_hcd.c:1987 [] call_timer_fn+0x15a/0x4f2 kernel/time/timer.c:1700 [] expire_timers kernel/time/timer.c:1751 [inline] [] __run_timers+0x57e/0x73c kernel/time/timer.c:2022 [] run_timer_softirq+0x46/0x80 kernel/time/timer.c:2035 [] __do_softirq+0x2f4/0x89e kernel/softirq.c:553 [] invoke_softirq kernel/softirq.c:427 [inline] [] __irq_exit_rcu kernel/softirq.c:632 [inline] [] irq_exit_rcu+0x13c/0x1e4 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:250 The buggy address belongs to the virtual mapping at [ff200000046f8000, ff200000046fd000) created by: kernel_clone+0x118/0x896 kernel/fork.c:2907 The buggy address belongs to the physical page: page:ff1c00000241f540 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x907d5 flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 0ffe000000000000 0000000000000000 0000000000000122 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_NOWARN|__GFP_ZERO), pid 3000, tgid 3000 (dhcpcd-run-hook), ts 766745579100, free_ts 758683232700 __set_page_owner+0x32/0x18a mm/page_owner.c:192 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x8c/0xe2 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x5ae/0x13b8 mm/page_alloc.c:3312 __alloc_pages+0x1aa/0x13a0 mm/page_alloc.c:4568 alloc_pages_mpol+0xd4/0x2fc mm/mempolicy.c:2133 alloc_pages+0xbc/0x148 mm/mempolicy.c:2204 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x834/0xec2 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct kernel/fork.c:1118 [inline] copy_process+0x2272/0x3fba kernel/fork.c:2332 kernel_clone+0x118/0x896 kernel/fork.c:2907 __do_sys_clone+0xe4/0x118 kernel/fork.c:3050 __se_sys_clone kernel/fork.c:3018 [inline] __riscv_sys_clone+0x76/0x88 kernel/fork.c:3018 syscall_handler+0x76/0xba arch/riscv/include/asm/syscall.h:90 do_trap_ecall_u+0x9c/0x9e arch/riscv/kernel/traps.c:326 ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:108 page last free stack trace: __reset_page_owner+0x4c/0xf8 mm/page_owner.c:149 reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x24c/0x5a6 mm/page_alloc.c:2347 free_unref_page+0x5c/0x236 mm/page_alloc.c:2487 free_the_page mm/page_alloc.c:563 [inline] __free_pages+0x104/0x126 mm/page_alloc.c:4654 __free_slab+0xbc/0x112 mm/slub.c:2087 free_slab+0x38/0x190 mm/slub.c:2110 discard_slab mm/slub.c:2116 [inline] __unfreeze_partials+0x1c0/0x1f8 mm/slub.c:2655 put_cpu_partial+0x158/0x220 mm/slub.c:2731 __slab_free+0x20c/0x2de mm/slub.c:3679 do_slab_free mm/slub.c:3757 [inline] ___cache_free+0x134/0x152 mm/slub.c:3816 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x7a/0x16c mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x158/0x1ba mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x5e/0x84 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x1d6/0x2ac mm/slub.c:3502 getname_flags.part.0+0x48/0x2b6 fs/namei.c:140 getname_flags+0x66/0x9c include/linux/audit.h:321 Memory state around the buggy address: ff200000046fbb80: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ff200000046fbc00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 >ff200000046fbc80: f1 f1 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 ^ ff200000046fbd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff200000046fbd80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3 ==================================================================