================================================================== BUG: KASAN: slab-use-after-free in read_report_descriptor+0xb2/0xf0 drivers/hid/hid-core.c:2217 Read of size 7 at addr ffff88805de1d960 by task fido_id/8335 CPU: 0 PID: 8335 Comm: fido_id Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x241/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 read_report_descriptor+0xb2/0xf0 drivers/hid/hid-core.c:2217 kernfs_file_read_iter fs/kernfs/file.c:269 [inline] kernfs_fop_read_iter+0x434/0x680 fs/kernfs/file.c:298 __kernel_read+0x2e5/0x730 fs/read_write.c:428 integrity_kernel_read+0x8a/0xd0 security/integrity/iint.c:221 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xb1f/0x1960 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4d4/0xa30 security/integrity/ima/ima_api.c:290 process_measurement+0x123a/0x1d50 security/integrity/ima/ima_main.c:370 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3697 [inline] path_openat+0x2910/0x3270 fs/namei.c:3856 do_filp_open+0x1f2/0x430 fs/namei.c:3883 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f95492a7407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffe70f1f960 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f9549aaf880 RCX: 00007f95492a7407 RDX: 00000000000a0000 RSI: 000055c711b62730 RDI: ffffffffffffff9c RBP: 000055c711b62730 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000055c711b61930 R13: 00007ffe70f20b68 R14: 00007f9549c0e000 R15: 000055c6e23204d8 Allocated by task 5895: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc_node_track_caller+0xb4/0x230 mm/slab_common.c:1027 kmemdup+0x2b/0x70 mm/util.c:131 kmemdup include/linux/fortify-string.h:779 [inline] hid_open_report+0x1cd/0xee0 drivers/hid/hid-core.c:1251 hid_parse include/linux/hid.h:1155 [inline] cp2112_probe+0x178/0xba0 drivers/hid/hid-cp2112.c:1212 __hid_device_probe drivers/hid/hid-core.c:2714 [inline] hid_device_probe+0x283/0x5b0 drivers/hid/hid-core.c:2753 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xae0 drivers/base/dd.c:717 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879 driver_probe_device+0x4f/0x420 drivers/base/dd.c:909 __device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1037 bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459 __device_attach+0x2c1/0x420 drivers/base/dd.c:1109 bus_probe_device+0x180/0x260 drivers/base/bus.c:580 device_add+0x87c/0xc40 drivers/base/core.c:3768 hid_add_device+0x365/0x500 drivers/hid/hid-core.c:2899 usbhid_probe+0xe43/0x1260 drivers/hid/usbhid/hid-core.c:1448 usb_probe_interface+0x6eb/0xcf0 drivers/usb/core/driver.c:395 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xae0 drivers/base/dd.c:717 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879 driver_probe_device+0x4f/0x420 drivers/base/dd.c:909 __device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1037 bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459 __device_attach+0x2c1/0x420 drivers/base/dd.c:1109 bus_probe_device+0x180/0x260 drivers/base/bus.c:580 device_add+0x87c/0xc40 drivers/base/core.c:3768 usb_set_configuration+0x1bad/0x2220 drivers/usb/core/message.c:2271 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x12a/0x260 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xae0 drivers/base/dd.c:717 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879 driver_probe_device+0x4f/0x420 drivers/base/dd.c:909 __device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1037 bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459 __device_attach+0x2c1/0x420 drivers/base/dd.c:1109 bus_probe_device+0x180/0x260 drivers/base/bus.c:580 device_add+0x87c/0xc40 drivers/base/core.c:3768 usb_new_device+0x995/0x1550 drivers/usb/core/hub.c:2670 hub_port_connect drivers/usb/core/hub.c:5539 [inline] hub_port_connect_change drivers/usb/core/hub.c:5679 [inline] port_event drivers/usb/core/hub.c:5843 [inline] hub_event+0x29d5/0x4a80 drivers/usb/core/hub.c:5925 process_one_work kernel/workqueue.c:2657 [inline] process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff88805de1d960 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of freed 8-byte region [ffff88805de1d960, ffff88805de1d968) The buggy address belongs to the physical page: page:ffffea0001778740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5de1d flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888018841280 ffffea00017775c0 0000000000000002 raw: 0000000000000000 0000000000660066 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 5780, tgid 5780 (syz-executor), ts 100079127624, free_ts 32650529914 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582 prep_new_page mm/page_alloc.c:1589 [inline] get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501 alloc_slab_page+0x5d/0x180 mm/slub.c:1903 allocate_slab mm/slub.c:2050 [inline] new_slab+0x87/0x2d0 mm/slub.c:2103 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3275 __slab_alloc mm/slub.c:3361 [inline] __slab_alloc_node mm/slub.c:3414 [inline] slab_alloc_node mm/slub.c:3508 [inline] __kmem_cache_alloc_node+0x122/0x260 mm/slub.c:3557 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node_track_caller+0xa4/0x230 mm/slab_common.c:1027 kstrdup+0x3b/0x80 mm/util.c:62 __kernfs_new_node+0xaa/0x7f0 fs/kernfs/dir.c:620 kernfs_new_node+0x14c/0x260 fs/kernfs/dir.c:700 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1068 sysfs_add_file_mode_ns+0x237/0x2f0 fs/sysfs/file.c:298 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x431/0xd10 fs/sysfs/group.c:152 internal_create_groups fs/sysfs/group.c:192 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:218 setup_port drivers/infiniband/core/sysfs.c:1259 [inline] ib_setup_port_attrs+0xf6c/0x2370 drivers/infiniband/core/sysfs.c:1445 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1182 [inline] free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459 free_contig_range+0xa1/0x150 mm/page_alloc.c:6431 destroy_args+0x7d/0x840 mm/debug_vm_pgtable.c:1015 debug_vm_pgtable+0x411/0x440 mm/debug_vm_pgtable.c:1400 do_one_initcall+0x242/0x790 init/main.c:1215 do_initcall_level+0x13d/0x1f0 init/main.c:1277 do_initcalls+0x69/0xd0 init/main.c:1293 kernel_init_freeable+0x3d9/0x560 init/main.c:1530 kernel_init+0x1d/0x1c0 init/main.c:1420 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Memory state around the buggy address: ffff88805de1d800: fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc ffff88805de1d880: fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc fc >ffff88805de1d900: fc fc fa fc fc fc fc fa fc fc fc fc fb fc fc fc ^ ffff88805de1d980: fc fa fc fc fc fc 07 fc fc fc fc fa fc fc fc fc ffff88805de1da00: fa fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa ==================================================================