Workqueue: events nsim_dev_trap_report_work Call Trace: [] context_switch kernel/sched/core.c:5315 [inline] [] __schedule+0xd5a/0x3886 kernel/sched/core.c:6675 ================================================================== BUG: KASAN: out-of-bounds in walk_stackframe+0x3f0/0x452 arch/riscv/kernel/stacktrace.c:66 Read of size 8 at addr ff200000085679d8 by task ksoftirqd/0/16 CPU: 0 UID: 0 PID: 16 Comm: ksoftirqd/0 Not tainted 6.12.0-rc1-syzkaller-gcfb10de18538 #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:130 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:136 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x122/0x196 lib/dump_stack.c:120 [] print_address_description mm/kasan/report.c:377 [inline] [] print_report+0x290/0x5a0 mm/kasan/report.c:488 [] kasan_report+0xec/0x118 mm/kasan/report.c:601 [] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381 [] walk_stackframe+0x3f0/0x452 arch/riscv/kernel/stacktrace.c:66 [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:130 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:136 [] sched_show_task kernel/sched/core.c:7582 [inline] [] sched_show_task+0x42c/0x5dc kernel/sched/core.c:7557 [] show_state_filter+0xcc/0x28e kernel/sched/core.c:7627 [] 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+0x102/0x16c drivers/tty/vt/keyboard.c:656 [] kbd_keycode drivers/tty/vt/keyboard.c:1522 [inline] [] kbd_event+0x8ac/0x1056 drivers/tty/vt/keyboard.c:1541 [] input_handler_events_default+0xfe/0x174 drivers/input/input.c:2549 [] input_pass_values+0x708/0x830 drivers/input/input.c:126 [] input_event_dispose drivers/input/input.c:352 [inline] [] input_handle_event+0x536/0x13e6 drivers/input/input.c:369 [] input_event drivers/input/input.c:398 [inline] [] input_event+0x96/0xc8 drivers/input/input.c:390 [] hidinput_hid_event+0x722/0x23fe drivers/hid/hid-input.c:1719 [] hid_process_event+0x48a/0x59e drivers/hid/hid-core.c:1540 [] hid_input_array_field+0x49e/0x66e drivers/hid/hid-core.c:1652 [] hid_process_report drivers/hid/hid-core.c:1694 [inline] [] hid_report_raw_event+0x9d4/0x10f4 drivers/hid/hid-core.c:2040 [] __hid_input_report.constprop.0+0x2f6/0x3fc drivers/hid/hid-core.c:2110 [] hid_input_report+0x32/0x44 drivers/hid/hid-core.c:2132 [] hid_irq_in+0x2f6/0x732 drivers/hid/usbhid/hid-core.c:285 [] __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+0x1300/0x3394 drivers/usb/gadget/udc/dummy_hcd.c:1988 [] __run_hrtimer kernel/time/hrtimer.c:1691 [inline] [] __hrtimer_run_queues+0x19c/0x9d0 kernel/time/hrtimer.c:1755 [] hrtimer_run_softirq+0x140/0x2e6 kernel/time/hrtimer.c:1772 [] handle_softirqs+0x4a6/0x10de kernel/softirq.c:554 [] run_ksoftirqd kernel/softirq.c:927 [inline] [] run_ksoftirqd+0xce/0x144 kernel/softirq.c:919 [] smpboot_thread_fn+0x654/0xb98 kernel/smpboot.c:164 [] kthread+0x28c/0x3a6 kernel/kthread.c:389 [] ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326 The buggy address belongs to the virtual mapping at [ff20000008560000, ff20000008569000) created by: kernel_clone+0x11e/0x92c kernel/fork.c:2787 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xff6000001cf07e58 pfn:0x9cf07 flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 0ffe000000000000 0000000000000000 dead000000000122 0000000000000000 raw: ff6000001cf07e58 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 951, tgid 951 (kworker/u10:5), ts 671328720600, free_ts 670094144900 __set_page_owner+0xa2/0x70c mm/page_owner.c:320 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xec/0x1e4 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0xdaa/0x295a mm/page_alloc.c:3457 __alloc_pages_noprof+0x1e2/0x1eb6 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0xf8/0x48a mm/mempolicy.c:2265 alloc_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2345 vm_area_alloc_pages mm/vmalloc.c:3568 [inline] __vmalloc_area_node mm/vmalloc.c:3646 [inline] __vmalloc_node_range_noprof+0x642/0x1450 mm/vmalloc.c:3828 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct kernel/fork.c:1115 [inline] copy_process+0x365c/0x8e32 kernel/fork.c:2206 kernel_clone+0x11e/0x92c kernel/fork.c:2787 user_mode_thread+0xea/0x11a kernel/fork.c:2865 call_usermodehelper_exec_sync kernel/umh.c:133 [inline] call_usermodehelper_exec_work+0x6c/0x1ac kernel/umh.c:164 process_one_work+0x956/0x1dae kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3391 kthread+0x28c/0x3a6 kernel/kthread.c:389 ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326 page last free pid 3527 tgid 3527 stack trace: __reset_page_owner+0x8c/0x400 mm/page_owner.c:297 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0x592/0xf08 mm/page_alloc.c:2638 __free_pages+0x13c/0x1bc mm/page_alloc.c:4820 __free_slab+0xc8/0x16e mm/slub.c:2649 free_slab+0x38/0x1ae mm/slub.c:2672 discard_slab mm/slub.c:2678 [inline] __put_partials+0x174/0x1de mm/slub.c:3146 put_cpu_partial+0x17e/0x298 mm/slub.c:3221 __slab_free+0x112/0x3f6 mm/slub.c:4450 do_slab_free mm/slub.c:4532 [inline] ___cache_free+0x1a6/0x1e0 mm/slub.c:4638 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x76/0x16c mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x158/0x1ba mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x5c/0x82 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4086 [inline] slab_alloc_node mm/slub.c:4135 [inline] __do_kmalloc_node mm/slub.c:4264 [inline] __kmalloc_node_noprof+0x232/0x522 mm/slub.c:4271 __kvmalloc_node_noprof+0xca/0x252 mm/util.c:658 seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x6fa/0x101e fs/seq_file.c:210 proc_reg_read_iter+0x198/0x252 fs/proc/inode.c:299 Memory state around the buggy address: ff20000008567880: 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 00 00 f2 f2 ff20000008567900: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 >ff20000008567980: f1 f1 01 f2 04 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ff20000008567a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff20000008567a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================