usb 1-1: config 0 interface 0 altsetting 0 has 1 endpoint descriptor, different from the interface descriptor's value: 9 usb 1-1: New USB device found, idVendor=11c0, idProduct=5506, bcdDevice= 0.00 usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 usb 1-1: config 0 descriptor?? betop 0003:11C0:5506.0001: hidraw0: USB HID v0.00 Device [HID 11c0:5506] on usb-dummy_hcd.0-1/input0 ================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_write include/linux/instrumented.h:86 [inline] BUG: KASAN: slab-out-of-bounds in set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline] BUG: KASAN: slab-out-of-bounds in betopff_init drivers/hid/hid-betopff.c:99 [inline] BUG: KASAN: slab-out-of-bounds in betop_probe+0x3bb/0x5e0 drivers/hid/hid-betopff.c:134 Write of size 8 at addr ffff888027a03dc0 by task kworker/1:0/20 CPU: 1 PID: 20 Comm: kworker/1:0 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x13e/0x1d6 lib/dump_stack.c:129 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186 instrument_atomic_write include/linux/instrumented.h:86 [inline] set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline] betopff_init drivers/hid/hid-betopff.c:99 [inline] betop_probe+0x3bb/0x5e0 drivers/hid/hid-betopff.c:134 hid_device_probe+0x2bd/0x3f0 drivers/hid/hid-core.c:2287 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 hid_add_device+0x344/0x9d0 drivers/hid/hid-core.c:2439 usbhid_probe+0xb88/0x1080 drivers/hid/usbhid/hid-core.c:1409 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_new_device.cold+0x721/0x1058 drivers/usb/core/hub.c:2556 hub_port_connect drivers/usb/core/hub.c:5276 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x2357/0x4330 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 20: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:431 [inline] ____kasan_kmalloc mm/kasan/common.c:510 [inline] ____kasan_kmalloc mm/kasan/common.c:469 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:519 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:720 [inline] hidraw_connect+0x4b/0x440 drivers/hid/hidraw.c:543 hid_connect+0x5be/0xbc0 drivers/hid/hid-core.c:1960 hid_hw_start drivers/hid/hid-core.c:2059 [inline] hid_hw_start+0xa2/0x130 drivers/hid/hid-core.c:2050 betop_probe+0xce/0x5e0 drivers/hid/hid-betopff.c:128 hid_device_probe+0x2bd/0x3f0 drivers/hid/hid-core.c:2287 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 hid_add_device+0x344/0x9d0 drivers/hid/hid-core.c:2439 usbhid_probe+0xb88/0x1080 drivers/hid/usbhid/hid-core.c:1409 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_new_device.cold+0x721/0x1058 drivers/usb/core/hub.c:2556 hub_port_connect drivers/usb/core/hub.c:5276 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x2357/0x4330 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 insert_work+0x48/0x370 kernel/workqueue.c:1331 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1497 queue_work_on+0xee/0x110 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1f0/0x4c0 kernel/umh.c:435 kobject_uevent_env+0xf8f/0x1650 lib/kobject_uevent.c:618 device_del+0x7eb/0xd40 drivers/base/core.c:3518 device_unregister+0x1f/0xc0 drivers/base/core.c:3541 device_destroy+0x96/0xd0 drivers/base/core.c:4087 vcs_remove_sysfs+0x1d/0x50 drivers/tty/vt/vc_screen.c:796 vc_deallocate+0x154/0x460 drivers/tty/vt/vt.c:1382 vt_disallocate drivers/tty/vt/vt_ioctl.c:637 [inline] vt_ioctl+0x25dc/0x2ac0 drivers/tty/vt/vt_ioctl.c:901 tty_ioctl+0xe4d/0x1600 drivers/tty/tty_io.c:2812 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 do_syscall_64+0x31/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 insert_work+0x48/0x370 kernel/workqueue.c:1331 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1497 queue_work_on+0xee/0x110 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1f0/0x4c0 kernel/umh.c:435 kobject_uevent_env+0xf8f/0x1650 lib/kobject_uevent.c:618 kobject_synth_uevent+0x701/0x850 lib/kobject_uevent.c:208 uevent_store+0x20/0x50 drivers/base/core.c:2366 dev_attr_store+0x50/0x80 drivers/base/core.c:2067 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:139 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x75a/0xa40 fs/read_write.c:605 ksys_write+0x12d/0x250 fs/read_write.c:658 do_syscall_64+0x31/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888027a03d00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes to the right of 192-byte region [ffff888027a03d00, ffff888027a03dc0) The buggy address belongs to the page: page:ffffea00009e80c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27a03 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00005eac00 0000000200000002 ffff888011041a00 raw: 0000000000000000 0000000080100010 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 12850711408, free_ts 12412593932 prep_new_page mm/page_alloc.c:2377 [inline] get_page_from_freelist+0x125c/0x2ed0 mm/page_alloc.c:4038 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5239 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2147 alloc_pages+0x238/0x2a0 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1686 [inline] allocate_slab+0x2c2/0x4c0 mm/slub.c:1826 new_slab mm/slub.c:1889 [inline] new_slab_objects mm/slub.c:2635 [inline] ___slab_alloc+0x4ba/0x820 mm/slub.c:2798 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2838 slab_alloc_node mm/slub.c:2920 [inline] slab_alloc mm/slub.c:2962 [inline] kmem_cache_alloc_trace+0x30f/0x3c0 mm/slub.c:2979 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:720 [inline] call_usermodehelper_setup+0x97/0x340 kernel/umh.c:365 kobject_uevent_env+0xf73/0x1650 lib/kobject_uevent.c:614 netdev_queue_add_kobject net/core/net-sysfs.c:1621 [inline] netdev_queue_update_kobjects+0x374/0x450 net/core/net-sysfs.c:1655 register_queue_kobjects net/core/net-sysfs.c:1716 [inline] netdev_register_kobject+0x35a/0x430 net/core/net-sysfs.c:1959 register_netdevice+0xd33/0x1500 net/core/dev.c:10288 register_netdev+0x2d/0x50 net/core/dev.c:10412 ip6_tnl_init_net+0x479/0x890 net/ipv6/ip6_tunnel.c:2286 ops_init+0xaf/0x470 net/core/net_namespace.c:140 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1305 [inline] free_pcp_prepare+0x217/0x300 mm/page_alloc.c:1349 free_unref_page_prepare mm/page_alloc.c:3272 [inline] free_unref_page_list+0x19f/0x1050 mm/page_alloc.c:3340 release_pages+0x824/0x20b0 mm/swap.c:972 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu mm/mmu_gather.c:249 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340 exit_mmap+0x1ea/0x620 mm/mmap.c:3203 __mmput+0x122/0x470 kernel/fork.c:1096 mmput+0x58/0x60 kernel/fork.c:1117 free_bprm+0x65/0x2e0 fs/exec.c:1478 kernel_execve+0x380/0x460 fs/exec.c:1975 call_usermodehelper_exec_async+0x2e3/0x580 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Memory state around the buggy address: ffff888027a03c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888027a03d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888027a03d80