================================================================== BUG: KASAN: slab-use-after-free in report_descriptor_read+0xb5/0x100 drivers/hid/hid-core.c:2218 Read of size 5 at addr ffff888079630260 by task fido_id/7464 CPU: 0 UID: 0 PID: 7464 Comm: fido_id Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 report_descriptor_read+0xb5/0x100 drivers/hid/hid-core.c:2218 kernfs_file_read_iter fs/kernfs/file.c:269 [inline] kernfs_fop_read_iter+0x451/0x6b0 fs/kernfs/file.c:298 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x55a/0xa30 fs/read_write.c:572 ksys_read+0x145/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbd01ea7407 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:00007ffe69ec52a0 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fbd0268b880 RCX: 00007fbd01ea7407 RDX: 0000000000001000 RSI: 00007ffe69ec52f0 RDI: 0000000000000004 RBP: 00005564caf02730 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00005564caf01930 R13: 00007ffe69ec52f0 R14: 0000000000000004 R15: 00005564bcd114d8 Allocated by task 9: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:397 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5672 [inline] __kmalloc_node_track_caller_noprof+0x571/0x810 mm/slub.c:5779 kmemdup_noprof+0x2b/0x70 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:765 [inline] hid_open_report+0x208/0xee0 drivers/hid/hid-core.c:1303 hid_parse include/linux/hid.h:1164 [inline] lg_probe+0x270/0x810 drivers/hid/hid-lg.c:783 __hid_device_probe drivers/hid/hid-core.c:2775 [inline] hid_device_probe+0x416/0x7a0 drivers/hid/hid-core.c:2812 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0xad0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:801 driver_probe_device+0x4f/0x240 drivers/base/dd.c:831 __device_attach_driver+0x279/0x430 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500 __device_attach+0x2b8/0x430 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:575 device_add+0x7b6/0xb80 drivers/base/core.c:3689 hid_add_device+0x272/0x3e0 drivers/hid/hid-core.c:2951 usbhid_probe+0xe13/0x12c0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x668/0xc90 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0xad0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:801 driver_probe_device+0x4f/0x240 drivers/base/dd.c:831 __device_attach_driver+0x279/0x430 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500 __device_attach+0x2b8/0x430 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:575 device_add+0x7b6/0xb80 drivers/base/core.c:3689 usb_set_configuration+0x1a87/0x2110 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x3c0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0xad0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:801 driver_probe_device+0x4f/0x240 drivers/base/dd.c:831 __device_attach_driver+0x279/0x430 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500 __device_attach+0x2b8/0x430 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:575 device_add+0x7b6/0xb80 drivers/base/core.c:3689 usb_new_device+0xa39/0x1720 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+0x29b1/0x4ef0 drivers/usb/core/hub.c:5953 process_one_work+0x94a/0x15d0 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3350 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3431 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 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 ffff888079630260 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of freed 8-byte region [ffff888079630260, ffff888079630268) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79630 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88813fe26500 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000800080 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5880, tgid 5880 (kworker/1:5), ts 96065898179, free_ts 96051723331 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3920 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5209 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3084 [inline] allocate_slab+0x96/0x350 mm/slub.c:3257 new_slab mm/slub.c:3311 [inline] ___slab_alloc+0xf56/0x1990 mm/slub.c:4671 __slab_alloc+0x65/0x100 mm/slub.c:4794 __slab_alloc_node mm/slub.c:4870 [inline] slab_alloc_node mm/slub.c:5266 [inline] __do_kmalloc_node mm/slub.c:5671 [inline] __kmalloc_noprof+0x47d/0x800 mm/slub.c:5684 kmalloc_noprof include/linux/slab.h:961 [inline] raw_event_queue_add drivers/usb/gadget/legacy/raw_gadget.c:72 [inline] raw_queue_event+0x86/0x2e0 drivers/usb/gadget/legacy/raw_gadget.c:239 gadget_resume+0x51/0xf0 drivers/usb/gadget/legacy/raw_gadget.c:407 set_link_state+0xb98/0x1220 drivers/usb/gadget/udc/dummy_hcd.c:-1 dummy_hub_control+0xecf/0x1a30 drivers/usb/gadget/udc/dummy_hcd.c:2233 rh_call_control drivers/usb/core/hcd.c:656 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:821 [inline] usb_hcd_submit_urb+0xddc/0x1b80 drivers/usb/core/hcd.c:1542 usb_start_wait_urb+0x115/0x4f0 drivers/usb/core/message.c:59 usb_internal_control_msg drivers/usb/core/message.c:103 [inline] usb_control_msg+0x232/0x3e0 drivers/usb/core/message.c:154 get_port_status drivers/usb/core/hub.c:607 [inline] hub_ext_port_status+0x116/0x820 drivers/usb/core/hub.c:624 page last free pid 5824 tgid 5824 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2948 discard_slab mm/slub.c:3355 [inline] __put_partials+0x146/0x170 mm/slub.c:3899 put_cpu_partial+0x1f2/0x2e0 mm/slub.c:3974 __slab_free+0x25b/0x2e0 mm/slub.c:5966 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4968 [inline] slab_alloc_node mm/slub.c:5278 [inline] __do_kmalloc_node mm/slub.c:5671 [inline] __kmalloc_noprof+0x3cf/0x800 mm/slub.c:5684 kmalloc_noprof include/linux/slab.h:961 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1c1/0x3b0 security/tomoyo/file.c:771 security_file_open+0xb1/0x270 security/security.c:2636 do_dentry_open+0x384/0x13f0 fs/open.c:939 vfs_open+0x3b/0x340 fs/open.c:1094 do_open fs/namei.c:3975 [inline] path_openat+0x2efb/0x3860 fs/namei.c:4134 do_filp_open+0x1fa/0x410 fs/namei.c:4161 do_sys_openat2+0x121/0x1c0 fs/open.c:1434 Memory state around the buggy address: ffff888079630100: 06 fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ffff888079630180: 05 fc fc fc fa fc fc fc 05 fc fc fc 05 fc fc fc >ffff888079630200: 05 fc fc fc 00 fc fc fc fa fc fc fc fb fc fc fc ^ ffff888079630280: 05 fc fc fc 05 fc fc fc 00 fc fc fc 04 fc fc fc ffff888079630300: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc ==================================================================