bisecting fixing commit since 324c92e5e0ee0e993bdb106fac407846ed677f6b building syzkaller on 0740de696b19a870c7208bd97f3194988281c282 testing commit 324c92e5e0ee0e993bdb106fac407846ed677f6b compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7abcb0eeef92b5526d6babd10d2c00c4b0f45358e641cba65a030f143d3ef7d2 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing current HEAD 2b14864acbaaf03d9c01982e243a84632524c3ac testing commit 2b14864acbaaf03d9c01982e243a84632524c3ac compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4bcfcd4ff94be43e6e129eddd43e8546d9281701d76d595a43c89dc53e9abebc all runs: crashed: KASAN: slab-out-of-bounds Write in vmk80xx_auto_attach revisions tested: 2, total time: 20m41.078817307s (build: 13m49.528259675s, test: 6m3.42945154s) the crash still happens on HEAD commit msg: Merge tag 'ceph-for-5.16-rc6' of git://github.com/ceph/ceph-client crash: KASAN: slab-out-of-bounds Write in vmk80xx_auto_attach usb 1-1: New USB device found, idVendor=10cf, idProduct=5503, bcdDevice=8f.60 usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 usb 1-1: config 0 descriptor?? ================================================================== BUG: KASAN: slab-out-of-bounds in memset include/linux/fortify-string.h:209 [inline] BUG: KASAN: slab-out-of-bounds in vmk80xx_reset_device drivers/comedi/drivers/vmk80xx.c:227 [inline] BUG: KASAN: slab-out-of-bounds in vmk80xx_auto_attach+0x136e/0x19c0 drivers/comedi/drivers/vmk80xx.c:819 Write of size 296 at addr ffff88807cf02680 by task kworker/1:6/3651 CPU: 1 PID: 3651 Comm: kworker/1:6 Not tainted 5.16.0-rc5-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+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memset+0x20/0x40 mm/kasan/shadow.c:44 memset include/linux/fortify-string.h:209 [inline] vmk80xx_reset_device drivers/comedi/drivers/vmk80xx.c:227 [inline] vmk80xx_auto_attach+0x136e/0x19c0 drivers/comedi/drivers/vmk80xx.c:819 comedi_auto_config+0x138/0x1e0 drivers/comedi/drivers.c:1067 usb_probe_interface+0x274/0x6a0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa57/0x1b80 drivers/base/core.c:3394 usb_set_configuration+0xa66/0x18b0 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 usb_probe_device+0x95/0x240 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa57/0x1b80 drivers/base/core.c:3394 usb_new_device.cold+0x5cf/0xee8 drivers/usb/core/hub.c:2563 hub_port_connect drivers/usb/core/hub.c:5353 [inline] hub_port_connect_change drivers/usb/core/hub.c:5497 [inline] port_event drivers/usb/core/hub.c:5643 [inline] hub_event+0x111f/0x3830 drivers/usb/core/hub.c:5725 process_one_work+0x87f/0x1450 kernel/workqueue.c:2298 worker_thread+0x598/0x1040 kernel/workqueue.c:2445 kthread+0x3ab/0x480 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 3651: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:595 [inline] kzalloc include/linux/slab.h:724 [inline] vmk80xx_alloc_usb_buffers drivers/comedi/drivers/vmk80xx.c:689 [inline] vmk80xx_auto_attach+0x782/0x19c0 drivers/comedi/drivers/vmk80xx.c:812 comedi_auto_config+0x138/0x1e0 drivers/comedi/drivers.c:1067 usb_probe_interface+0x274/0x6a0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa57/0x1b80 drivers/base/core.c:3394 usb_set_configuration+0xa66/0x18b0 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 usb_probe_device+0x95/0x240 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa57/0x1b80 drivers/base/core.c:3394 usb_new_device.cold+0x5cf/0xee8 drivers/usb/core/hub.c:2563 hub_port_connect drivers/usb/core/hub.c:5353 [inline] hub_port_connect_change drivers/usb/core/hub.c:5497 [inline] port_event drivers/usb/core/hub.c:5643 [inline] hub_event+0x111f/0x3830 drivers/usb/core/hub.c:5725 process_one_work+0x87f/0x1450 kernel/workqueue.c:2298 worker_thread+0x598/0x1040 kernel/workqueue.c:2445 kthread+0x3ab/0x480 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88807cf02680 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff88807cf02680, ffff88807cf026c0) The buggy address belongs to the page: page:ffffea0001f3c080 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cf02 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000764bc0 dead000000000003 ffff88800fc41640 raw: 0000000000000000 0000000080200020 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 0x12c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY), pid 3005, ts 8477582371, free_ts 7437361639 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa6f/0x2f10 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0x32d/0x4a0 mm/slub.c:1993 ___slab_alloc+0x91a/0xfd0 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] slab_alloc mm/slub.c:3242 [inline] __kmalloc+0x2fb/0x340 mm/slub.c:4419 kmalloc include/linux/slab.h:595 [inline] kzalloc include/linux/slab.h:724 [inline] tomoyo_encode2.part.0+0x92/0x310 security/tomoyo/realpath.c:45 tomoyo_realpath_from_path+0x140/0x6a0 security/tomoyo/realpath.c:288 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1fb/0x350 security/tomoyo/file.c:822 security_inode_getattr+0xab/0x100 security/security.c:1334 vfs_getattr fs/stat.c:157 [inline] vfs_statx+0xe8/0x2e0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat+0x7d/0xd0 fs/stat.c:412 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 free_contig_range+0xa8/0xf0 mm/page_alloc.c:9271 destroy_args+0x7e/0x503 mm/debug_vm_pgtable.c:1016 debug_vm_pgtable+0x1ee5/0x1f69 mm/debug_vm_pgtable.c:1330 do_one_initcall+0xbe/0x440 init/main.c:1297 do_initcall_level init/main.c:1370 [inline] do_initcalls init/main.c:1386 [inline] do_basic_setup init/main.c:1405 [inline] kernel_init_freeable+0x5ab/0x605 init/main.c:1610 kernel_init+0x14/0x130 init/main.c:1499 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88807cf02580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88807cf02600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88807cf02680: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff88807cf02700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88807cf02780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================