hid-thrustmaster 0003:044F:B65D.0001: unknown main item tag 0x0 hid-thrustmaster 0003:044F:B65D.0001: 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 ffff8f800d426221 by task kworker/0:4/3881 CPU: 0 UID: 0 PID: 3881 Comm: kworker/0:4 Not tainted 6.14.0-rc1-syzkaller-g245aece3750d #0 Hardware name: riscv-virtio,qemu (DT) Workqueue: usb_hub_wq hub_event 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:378 [inline] [] print_report+0x28e/0x5aa mm/kasan/report.c:489 [] kasan_report+0xf0/0x214 mm/kasan/report.c:602 [] __asan_report_load1_noabort+0x12/0x1a mm/kasan/report_generic.c:378 [] usb_check_int_endpoints+0x242/0x264 drivers/usb/core/usb.c:277 [] thrustmaster_interrupts drivers/hid/hid-thrustmaster.c:176 [inline] [] thrustmaster_probe+0x45c/0xb9a drivers/hid/hid-thrustmaster.c:347 [] __hid_device_probe drivers/hid/hid-core.c:2713 [inline] [] hid_device_probe+0x312/0x668 drivers/hid/hid-core.c:2750 [] 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 [] hid_add_device+0x366/0x9d8 drivers/hid/hid-core.c:2896 [] 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 [] usb_set_configuration+0xf08/0x19dc drivers/usb/core/message.c:2210 [] usb_generic_driver_probe+0xae/0x128 drivers/usb/core/generic.c:250 [] usb_probe_device+0xd6/0x360 drivers/usb/core/driver.c:291 [] 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 [] usb_new_device+0x964/0x1778 drivers/usb/core/hub.c:2652 [] hub_port_connect drivers/usb/core/hub.c:5523 [inline] [] hub_port_connect_change drivers/usb/core/hub.c:5663 [inline] [] port_event drivers/usb/core/hub.c:5823 [inline] [] hub_event+0x2716/0x48de drivers/usb/core/hub.c:5905 [] 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 The buggy address belongs to stack of task kworker/0:4/3881 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 [ffff8f800d420000, ffff8f800d429000) 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:0x0 pfn:0x9d344 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_NOWARN|__GFP_ZERO), pid 30, tgid 30 (kworker/u9:1), ts 448432200200, free_ts 448196909100 __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+0x2c02/0x6c8e kernel/fork.c:2233 kernel_clone+0x11e/0xc3c kernel/fork.c:2815 user_mode_thread+0xea/0x11a kernel/fork.c:2893 call_usermodehelper_exec_sync kernel/umh.c:132 [inline] call_usermodehelper_exec_work+0x6c/0x1ac kernel/umh.c:163 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 3175 tgid 3175 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 page_frag_free+0x336/0x382 mm/page_frag_cache.c:169 skb_free_frag include/linux/skbuff.h:3445 [inline] skb_free_head+0x1ca/0x2e8 net/core/skbuff.c:1096 skb_release_data+0x6ee/0x86c net/core/skbuff.c:1125 skb_release_all net/core/skbuff.c:1190 [inline] __kfree_skb+0x46/0x68 net/core/skbuff.c:1204 tcp_rcv_established+0xf68/0x268e net/ipv4/tcp_input.c:6192 tcp_v4_do_rcv+0x68a/0xbaa net/ipv4/tcp_ipv4.c:1918 tcp_v4_rcv+0x340e/0x4634 net/ipv4/tcp_ipv4.c:2353 ip_protocol_deliver_rcu+0xa2/0x64a net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x2ee/0x57e net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_local_deliver+0x1b2/0x568 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:469 [inline] ip_sublist_rcv_finish+0x148/0x2ba net/ipv4/ip_input.c:578 ip_list_rcv_finish net/ipv4/ip_input.c:627 [inline] ip_sublist_rcv+0x4ec/0x9f2 net/ipv4/ip_input.c:635 ip_list_rcv+0x2ae/0x3ce net/ipv4/ip_input.c:669 __netif_receive_skb_list_ptype net/core/dev.c:5871 [inline] __netif_receive_skb_list_core+0x45e/0x75e net/core/dev.c:5918 Memory state around the buggy address: ffff8f800d426100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f800d426180: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 >ffff8f800d426200: f1 f1 04 f2 01 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffff8f800d426280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f800d426300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================