================================================================== BUG: KASAN: slab-use-after-free in report_descriptor_read+0xbb/0x100 drivers/hid/hid-core.c:2272 Read of size 41 at addr ffff888107beda80 by task fido_id/14622 CPU: 1 UID: 0 PID: 14622 Comm: fido_id Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:186 [inline] kasan_check_range+0x10f/0x1e0 mm/kasan/generic.c:200 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 report_descriptor_read+0xbb/0x100 drivers/hid/hid-core.c:2272 sysfs_kf_bin_read+0x156/0x210 fs/sysfs/file.c:102 kernfs_file_read_iter fs/kernfs/file.c:262 [inline] kernfs_fop_read_iter+0x32b/0x610 fs/kernfs/file.c:291 new_sync_read fs/read_write.c:493 [inline] vfs_read+0x82e/0xb40 fs/read_write.c:574 ksys_read+0x12a/0x250 fs/read_write.c:716 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f71812f6407 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:00007fff789f5cb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f7181208880 RCX: 00007f71812f6407 RDX: 0000000000001000 RSI: 00007fff789f5d00 RDI: 0000000000000004 RBP: 0000562332b052c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000562332b044c0 R13: 00007fff789f5d00 R14: 0000000000000004 R15: 000056232ce454d8 Allocated by task 13300: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5334 [inline] __kmalloc_node_track_caller_noprof+0x318/0x7d0 mm/slub.c:5471 kmemdup_noprof+0x29/0x60 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:715 [inline] hid_open_report+0x214/0x810 drivers/hid/hid-core.c:1376 hid_parse include/linux/hid.h:1206 [inline] lg_probe+0x246/0x7e0 drivers/hid/hid-lg.c:783 __hid_device_probe drivers/hid/hid-core.c:2829 [inline] hid_device_probe+0x50e/0x800 drivers/hid/hid-core.c:2866 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3772 hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:3010 usbhid_probe+0xa64/0x10b0 drivers/hid/usbhid/hid-core.c:1452 usb_probe_interface+0x386/0x9b0 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3772 usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3772 usb_new_device.cold+0x685/0x115c drivers/usb/core/hub.c:2700 hub_port_connect drivers/usb/core/hub.c:5572 [inline] hub_port_connect_change drivers/usb/core/hub.c:5712 [inline] port_event drivers/usb/core/hub.c:5876 [inline] hub_event+0x314d/0x4af0 drivers/usb/core/hub.c:5958 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x69a/0xc80 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 ffff888107beda80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of freed 64-byte region [ffff888107beda80, ffff888107bedac0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107bed flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff8881000418c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800200020 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5521, tgid 5520 (syz.1.86), ts 129799208275, free_ts 128825345618 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf25/0x3400 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x28f/0x2b90 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab mm/slub.c:3380 [inline] new_slab+0xa2/0x670 mm/slub.c:3426 refill_objects+0xe3/0x410 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_noprof+0x60d/0x7c0 mm/slub.c:5359 _kmalloc_noprof include/linux/slab.h:992 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] kobject_get_path+0xcf/0x2c0 lib/kobject.c:161 kobject_uevent_env+0x287/0x18b0 lib/kobject_uevent.c:548 __kobject_del+0x168/0x220 lib/kobject.c:601 kobject_cleanup lib/kobject.c:680 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x348/0x640 lib/kobject.c:737 bus_remove_driver+0x16e/0x2e0 drivers/base/bus.c:834 driver_unregister+0x76/0xb0 drivers/base/driver.c:202 usb_gadget_register_driver_owner.cold+0x6c/0xd0 drivers/usb/gadget/udc/core.c:1774 raw_ioctl_run drivers/usb/gadget/legacy/raw_gadget.c:596 [inline] raw_ioctl+0x1a85/0x2b80 drivers/usb/gadget/legacy/raw_gadget.c:1307 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 page last free pid 5237 tgid 5237 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x716/0xf50 mm/page_alloc.c:2950 rcu_do_batch kernel/rcu/tree.c:2645 [inline] rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2897 handle_softirqs+0x1dd/0x990 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x160/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 Memory state around the buggy address: ffff888107bed980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888107beda00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888107beda80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888107bedb00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888107bedb80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================