hid-thrustmaster 0003:044F:B65D.0014: unknown main item tag 0x0 hid-thrustmaster 0003:044F:B65D.0014: hidraw0: USB HID v0.00 Device [HID 044f:b65d] on usb-dummy_hcd.0-1/input0 ================================================================== BUG: KASAN: stack-out-of-bounds in usb_check_int_endpoints+0x242/0x264 drivers/usb/core/usb.c:277 Read of size 1 at addr ffff8f8001bd6221 by task kworker/1:6/9574 CPU: 1 UID: 0 PID: 9574 Comm: kworker/1:6 Not tainted 6.14.0-rc1-syzkaller-g245aece3750d #0 Hardware name: riscv-virtio,qemu (DT) Workqueue: usb_hub_wq hub_event Call Trace: [<ffffffff80074518>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [<ffffffff80003206>] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [<ffffffff8005fa4c>] __dump_stack lib/dump_stack.c:94 [inline] [<ffffffff8005fa4c>] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [<ffffffff8000eac8>] print_address_description mm/kasan/report.c:378 [inline] [<ffffffff8000eac8>] print_report+0x28e/0x5aa mm/kasan/report.c:489 [<ffffffff80a6e636>] kasan_report+0xf0/0x214 mm/kasan/report.c:602 [<ffffffff80a70424>] __asan_report_load1_noabort+0x12/0x1a mm/kasan/report_generic.c:378 [<ffffffff8364eb86>] usb_check_int_endpoints+0x242/0x264 drivers/usb/core/usb.c:277 [<ffffffff84843dc6>] thrustmaster_interrupts drivers/hid/hid-thrustmaster.c:176 [inline] [<ffffffff84843dc6>] thrustmaster_probe+0x45c/0xb9a drivers/hid/hid-thrustmaster.c:347 [<ffffffff84722402>] __hid_device_probe drivers/hid/hid-core.c:2713 [inline] [<ffffffff84722402>] hid_device_probe+0x312/0x668 drivers/hid/hid-core.c:2750 [<ffffffff82a4dd52>] call_driver_probe drivers/base/dd.c:579 [inline] [<ffffffff82a4dd52>] really_probe+0x232/0x9be drivers/base/dd.c:658 [<ffffffff82a4e6b2>] __driver_probe_device+0x1d4/0x3f2 drivers/base/dd.c:800 [<ffffffff82a4eb18>] driver_probe_device+0x60/0x1ce drivers/base/dd.c:830 [<ffffffff82a4ee68>] __device_attach_driver+0x1e2/0x2fc drivers/base/dd.c:958 [<ffffffff82a48572>] bus_for_each_drv+0x142/0x1da drivers/base/bus.c:462 [<ffffffff82a4f8a2>] __device_attach+0x1c4/0x462 drivers/base/dd.c:1030 [<ffffffff82a4fe48>] device_initial_probe+0x1c/0x26 drivers/base/dd.c:1079 [<ffffffff82a4afdc>] bus_probe_device+0x15c/0x192 drivers/base/bus.c:537 [<ffffffff82a444b8>] device_add+0x10da/0x181c drivers/base/core.c:3665 [<ffffffff8471b3c6>] hid_add_device+0x366/0x9d8 drivers/hid/hid-core.c:2896 [<ffffffff848af102>] usbhid_probe+0xa6e/0xf88 drivers/hid/usbhid/hid-core.c:1431 [<ffffffff8368edaa>] usb_probe_interface+0x2d6/0x8c4 drivers/usb/core/driver.c:396 [<ffffffff82a4dd52>] call_driver_probe drivers/base/dd.c:579 [inline] [<ffffffff82a4dd52>] really_probe+0x232/0x9be drivers/base/dd.c:658 [<ffffffff82a4e6b2>] __driver_probe_device+0x1d4/0x3f2 drivers/base/dd.c:800 [<ffffffff82a4eb18>] driver_probe_device+0x60/0x1ce drivers/base/dd.c:830 [<ffffffff82a4ee68>] __device_attach_driver+0x1e2/0x2fc drivers/base/dd.c:958 [<ffffffff82a48572>] bus_for_each_drv+0x142/0x1da drivers/base/bus.c:462 [<ffffffff82a4f8a2>] __device_attach+0x1c4/0x462 drivers/base/dd.c:1030 [<ffffffff82a4fe48>] device_initial_probe+0x1c/0x26 drivers/base/dd.c:1079 [<ffffffff82a4afdc>] bus_probe_device+0x15c/0x192 drivers/base/bus.c:537 [<ffffffff82a444b8>] device_add+0x10da/0x181c drivers/base/core.c:3665 [<ffffffff836885c8>] usb_set_configuration+0xf08/0x19dc drivers/usb/core/message.c:2210 [<ffffffff836b32ea>] usb_generic_driver_probe+0xae/0x128 drivers/usb/core/generic.c:250 [<ffffffff83689f0a>] usb_probe_device+0xd6/0x360 drivers/usb/core/driver.c:291 [<ffffffff82a4dd52>] call_driver_probe drivers/base/dd.c:579 [inline] [<ffffffff82a4dd52>] really_probe+0x232/0x9be drivers/base/dd.c:658 [<ffffffff82a4e6b2>] __driver_probe_device+0x1d4/0x3f2 drivers/base/dd.c:800 [<ffffffff82a4eb18>] driver_probe_device+0x60/0x1ce drivers/base/dd.c:830 [<ffffffff82a4ee68>] __device_attach_driver+0x1e2/0x2fc drivers/base/dd.c:958 [<ffffffff82a48572>] bus_for_each_drv+0x142/0x1da drivers/base/bus.c:462 [<ffffffff82a4f8a2>] __device_attach+0x1c4/0x462 drivers/base/dd.c:1030 [<ffffffff82a4fe48>] device_initial_probe+0x1c/0x26 drivers/base/dd.c:1079 [<ffffffff82a4afdc>] bus_probe_device+0x15c/0x192 drivers/base/bus.c:537 [<ffffffff82a444b8>] device_add+0x10da/0x181c drivers/base/core.c:3665 [<ffffffff8366429e>] usb_new_device+0x964/0x1778 drivers/usb/core/hub.c:2652 [<ffffffff8366a616>] hub_port_connect drivers/usb/core/hub.c:5523 [inline] [<ffffffff8366a616>] hub_port_connect_change drivers/usb/core/hub.c:5663 [inline] [<ffffffff8366a616>] port_event drivers/usb/core/hub.c:5823 [inline] [<ffffffff8366a616>] hub_event+0x2716/0x48de drivers/usb/core/hub.c:5905 [<ffffffff801b3668>] process_one_work+0x96a/0x1f3a kernel/workqueue.c:3236 [<ffffffff801b667a>] process_scheduled_works kernel/workqueue.c:3317 [inline] [<ffffffff801b667a>] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3398 [<ffffffff801d3b2e>] kthread+0x37e/0x7b6 kernel/kthread.c:464 [<ffffffff8626888e>] ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:327 The buggy address belongs to stack of task kworker/1:6/9574 and is located at offset 65 in frame: usb_fill_control_urb include/linux/usb.h:1679 [inline] thrustmaster_probe+0x0/0xb9a drivers/hid/hid-thrustmaster.c:253 This frame has 2 objects: [48, 52) 'trans' [64, 65) 'ep_addr' The buggy address belongs to the virtual mapping at [ffff8f8001bd0000, ffff8f8001bd9000) created by: kernel_clone+0x11e/0xc3c kernel/fork.c:2815 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffffaf80326bd000 pfn:0xb26bd flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 0ffe000000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffffaf80326bd000 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 7828, tgid 7828 (kworker/u10:6), ts 3643908910500, free_ts 3642635988800 __set_page_owner+0xa2/0x710 mm/page_owner.c:320 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xea/0x1e2 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xf78/0x2bd6 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x1e8/0x20fc mm/page_alloc.c:4739 alloc_pages_mpol+0x1fa/0x5b8 mm/mempolicy.c:2270 alloc_frozen_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2341 alloc_pages_noprof+0x20/0x48 mm/mempolicy.c:2361 vm_area_alloc_pages mm/vmalloc.c:3591 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0x640/0x120a mm/vmalloc.c:3846 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct kernel/fork.c:1127 [inline] copy_process+0x2c08/0x6c9a kernel/fork.c:2233 kernel_clone+0x11e/0xc3c kernel/fork.c:2815 user_mode_thread+0xea/0x11a kernel/fork.c:2893 call_usermodehelper_exec_work kernel/umh.c:171 [inline] call_usermodehelper_exec_work+0xd4/0x1ac kernel/umh.c:157 process_one_work+0x96a/0x1f3a kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3398 kthread+0x37e/0x7b6 kernel/kthread.c:464 ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:327 page last free pid 6720 tgid 6720 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:1127 [inline] free_frozen_pages+0x96a/0x155c mm/page_alloc.c:2660 __free_pages+0x13a/0x1ba mm/page_alloc.c:4838 vfree+0x1ac/0xd1a mm/vmalloc.c:3383 hid_scan_report drivers/hid/hid-core.c:973 [inline] hid_add_device+0x72c/0x9d8 drivers/hid/hid-core.c:2883 usbhid_probe+0xa6e/0xf88 drivers/hid/usbhid/hid-core.c:1431 usb_probe_interface+0x2d6/0x8c4 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x232/0x9be drivers/base/dd.c:658 __driver_probe_device+0x1d4/0x3f2 drivers/base/dd.c:800 driver_probe_device+0x60/0x1ce drivers/base/dd.c:830 __device_attach_driver+0x1e2/0x2fc drivers/base/dd.c:958 bus_for_each_drv+0x142/0x1da drivers/base/bus.c:462 __device_attach+0x1c4/0x462 drivers/base/dd.c:1030 device_initial_probe+0x1c/0x26 drivers/base/dd.c:1079 bus_probe_device+0x15c/0x192 drivers/base/bus.c:537 device_add+0x10da/0x181c drivers/base/core.c:3665 Memory state around the buggy address: ffff8f8001bd6100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f8001bd6180: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 >ffff8f8001bd6200: f1 f1 04 f2 01 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffff8f8001bd6280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f8001bd6300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================