================================================================== BUG: KASAN: slab-use-after-free in report_descriptor_read+0xbb/0x100 drivers/hid/hid-core.c:2218 Read of size 5 at addr ffff888116f9e0c0 by task fido_id/13094 CPU: 0 UID: 0 PID: 13094 Comm: fido_id Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:194 [inline] kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:200 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 report_descriptor_read+0xbb/0x100 drivers/hid/hid-core.c:2218 sysfs_kf_bin_read+0x156/0x210 fs/sysfs/file.c:103 kernfs_file_read_iter fs/kernfs/file.c:269 [inline] kernfs_fop_read_iter+0x32b/0x610 fs/kernfs/file.c:298 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x8bf/0xcf0 fs/read_write.c:572 ksys_read+0x12a/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f942b419407 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:00007ffc095d0380 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f942b32b880 RCX: 00007f942b419407 RDX: 0000000000001000 RSI: 00007ffc095d03d0 RDI: 0000000000000004 RBP: 0000561f68ffb2c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000561f68ffa4c0 R13: 00007ffc095d03d0 R14: 0000000000000004 R15: 0000561f37ab14d8 Allocated by task 44: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5627 [inline] __kmalloc_node_track_caller_noprof+0x343/0x850 mm/slub.c:5736 kmemdup_noprof+0x29/0x60 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:765 [inline] hid_open_report+0x223/0x830 drivers/hid/hid-core.c:1303 hid_parse include/linux/hid.h:1164 [inline] bigben_probe+0xc9/0xa30 drivers/hid/hid-bigbenff.c:386 __hid_device_probe drivers/hid/hid-core.c:2775 [inline] hid_device_probe+0x5ba/0x8d0 drivers/hid/hid-core.c:2812 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 hid_add_device+0x31b/0x5c0 drivers/hid/hid-core.c:2951 usbhid_probe+0xd38/0x13f0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x303/0xa40 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 usb_set_configuration+0x1187/0x1e20 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x3e0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 usb_new_device+0xd07/0x1a60 drivers/usb/core/hub.c:2695 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x2fce/0x5060 drivers/usb/core/hub.c:5953 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x56d/0x700 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 44: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2523 [inline] slab_free mm/slub.c:6611 [inline] kfree+0x288/0x670 mm/slub.c:6818 hid_close_report+0x2af/0x560 drivers/hid/hid-core.c:731 __hid_device_probe drivers/hid/hid-core.c:2792 [inline] hid_device_probe+0x60f/0x8d0 drivers/hid/hid-core.c:2812 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 hid_add_device+0x31b/0x5c0 drivers/hid/hid-core.c:2951 usbhid_probe+0xd38/0x13f0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x303/0xa40 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 usb_set_configuration+0x1187/0x1e20 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x3e0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:581 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:659 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:801 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:959 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1031 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1aa0 drivers/base/core.c:3689 usb_new_device+0xd07/0x1a60 drivers/usb/core/hub.c:2695 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x2fce/0x5060 drivers/usb/core/hub.c:5953 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x56d/0x700 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888116f9e0c0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of freed 8-byte region [ffff888116f9e0c0, ffff888116f9e0c8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888116f9ece0 pfn:0x116f9e flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff888100041500 ffffea0004cfe900 dead000000000002 raw: ffff888116f9ece0 0000000000800078 00000000f5000000 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 0x52c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 9462, tgid 9461 (syz.7.640), ts 403745372960, free_ts 403721866174 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x1003/0x2dc0 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x259/0x21f0 mm/page_alloc.c:5183 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3039 [inline] allocate_slab mm/slub.c:3212 [inline] new_slab+0x24a/0x360 mm/slub.c:3266 ___slab_alloc+0xdb7/0x1a70 mm/slub.c:4636 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4755 __slab_alloc_node mm/slub.c:4831 [inline] slab_alloc_node mm/slub.c:5253 [inline] __kmalloc_cache_noprof+0x3c8/0x750 mm/slub.c:5743 kmalloc_noprof include/linux/slab.h:957 [inline] usb_control_msg+0xbc/0x4a0 drivers/usb/core/message.c:144 get_port_status drivers/usb/core/hub.c:607 [inline] hub_ext_port_status+0x14e/0x670 drivers/usb/core/hub.c:624 usb_hub_port_status drivers/usb/core/hub.c:674 [inline] wait_for_connected drivers/usb/core/hub.c:3753 [inline] usb_port_resume+0xbf8/0x1860 drivers/usb/core/hub.c:3859 usb_generic_driver_resume+0x41/0xa0 drivers/usb/core/generic.c:317 usb_resume_device drivers/usb/core/driver.c:1304 [inline] usb_resume_both+0x6f0/0x960 drivers/usb/core/driver.c:1549 __rpm_callback+0xc8/0x610 drivers/base/power/runtime.c:406 rpm_callback+0x1b7/0x200 drivers/base/power/runtime.c:460 rpm_resume+0xd16/0x1320 drivers/base/power/runtime.c:939 page last free pid 5196 tgid 5196 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x78f/0x1000 mm/page_alloc.c:2906 selinux_genfs_get_sid security/selinux/hooks.c:1357 [inline] inode_doinit_with_dentry+0xacb/0x12e0 security/selinux/hooks.c:1555 selinux_d_instantiate+0x26/0x30 security/selinux/hooks.c:6523 security_d_instantiate+0x58/0xc0 security/security.c:4148 d_splice_alias_ops+0x92/0x840 fs/dcache.c:2999 kernfs_iop_lookup+0x23f/0x2d0 fs/kernfs/dir.c:1251 __lookup_slow+0x251/0x460 fs/namei.c:1816 lookup_slow fs/namei.c:1833 [inline] walk_component+0x353/0x5b0 fs/namei.c:2151 lookup_last fs/namei.c:2652 [inline] path_lookupat+0x142/0x6d0 fs/namei.c:2676 filename_lookup+0x224/0x5f0 fs/namei.c:2705 vfs_statx+0x101/0x3f0 fs/stat.c:353 vfs_fstatat+0x7b/0xf0 fs/stat.c:375 __do_sys_newfstatat+0x97/0x120 fs/stat.c:542 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888116f9df80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888116f9e000: fa fc fc fc 05 fc fc fc fa fc fc fc fa fc fc fc >ffff888116f9e080: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ^ ffff888116f9e100: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ffff888116f9e180: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ==================================================================