================================================================== BUG: KASAN: slab-use-after-free in report_descriptor_read+0xbb/0x100 drivers/hid/hid-core.c:2279 Read of size 24 at addr ffff888114786f40 by task fido_id/6507 CPU: 1 UID: 0 PID: 6507 Comm: fido_id Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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:2279 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:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdbac85a407 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:00007fff4f638cd0 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fdbac76c880 RCX: 00007fdbac85a407 RDX: 0000000000001000 RSI: 00007fff4f638d20 RDI: 0000000000000004 RBP: 000055db5f6b12c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000055db5f6b04c0 R13: 00007fff4f638d20 R14: 0000000000000004 R15: 000055db58b0c4d8 Allocated by task 5310: 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:409 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5531 [inline] __kmalloc_node_track_caller_noprof+0x323/0x810 mm/slub.c:5662 kmemdup_noprof+0x29/0x60 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:713 [inline] hid_open_report+0x214/0x810 drivers/hid/hid-core.c:1382 hid_parse include/linux/hid.h:1208 [inline] magicmouse_probe+0x232/0xae0 drivers/hid/hid-magicmouse.c:917 __hid_device_probe drivers/hid/hid-core.c:2839 [inline] hid_device_probe+0x4fe/0x850 drivers/hid/hid-core.c:2878 call_driver_probe drivers/base/dd.c:629 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:707 __driver_probe_device+0x210/0x460 drivers/base/dd.c:869 driver_probe_device+0x4a/0x140 drivers/base/dd.c:899 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131 device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190 __bus_probe_device+0x60/0x160 drivers/base/bus.c:614 device_add+0x121d/0x1970 drivers/base/core.c:3778 hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:3065 usbhid_probe+0xa64/0x10b0 drivers/hid/usbhid/hid-core.c:1459 usb_probe_interface+0x386/0x980 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:629 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:707 __driver_probe_device+0x210/0x460 drivers/base/dd.c:869 driver_probe_device+0x4a/0x140 drivers/base/dd.c:899 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131 device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190 __bus_probe_device+0x60/0x160 drivers/base/bus.c:614 device_add+0x121d/0x1970 drivers/base/core.c:3778 usb_set_configuration+0xd97/0x1dc0 drivers/usb/core/message.c:2280 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:629 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:707 __driver_probe_device+0x210/0x460 drivers/base/dd.c:869 driver_probe_device+0x4a/0x140 drivers/base/dd.c:899 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131 device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190 __bus_probe_device+0x60/0x160 drivers/base/bus.c:614 device_add+0x121d/0x1970 drivers/base/core.c:3778 usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2713 usb_new_device drivers/usb/core/hub.c:5838 [inline] hub_port_connect drivers/usb/core/hub.c:5585 [inline] hub_port_connect_change drivers/usb/core/hub.c:5725 [inline] port_event drivers/usb/core/hub.c:5889 [inline] hub_event.cold+0x51a/0xe9d drivers/usb/core/hub.c:5971 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3495 process_scheduled_works kernel/workqueue.c:3578 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3659 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x69f/0xc90 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 ffff888114786f40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of freed 32-byte region [ffff888114786f40, ffff888114786f60) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114786 flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff888100041780 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000400040 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3729, tgid 3729 (modprobe), ts 53177619624 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1856 prep_new_page mm/page_alloc.c:1864 [inline] get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3935 __alloc_frozen_pages_noprof+0x299/0x2d50 mm/page_alloc.c:5444 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab mm/slub.c:3499 [inline] new_slab+0xb1/0x6d0 mm/slub.c:3550 refill_objects+0xe3/0x410 mm/slub.c:7539 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] __kmalloc_cache_noprof+0x49c/0x680 mm/slub.c:5676 _kmalloc_noprof include/linux/slab.h:991 [inline] slab_free_hook mm/slub.c:2732 [inline] slab_free mm/slub.c:6630 [inline] kmem_cache_free+0x3f0/0x650 mm/slub.c:6757 vms_complete_munmap_vmas+0x7ac/0xdf0 mm/vma.c:1434 do_vmi_align_munmap+0x44f/0x5f0 mm/vma.c:1677 do_vmi_munmap+0x1f8/0x410 mm/vma.c:1725 __vm_munmap+0x196/0x3b0 mm/vma.c:3562 elf_map fs/binfmt_elf.c:395 [inline] elf_load+0x54f/0x720 fs/binfmt_elf.c:420 load_elf_binary+0xf3b/0x50e0 fs/binfmt_elf.c:1188 search_binary_handler fs/exec.c:1777 [inline] exec_binprm fs/exec.c:1809 [inline] bprm_execve fs/exec.c:1865 [inline] bprm_execve+0x8cb/0x17e0 fs/exec.c:1841 kernel_execve+0x31e/0x3a0 fs/exec.c:2009 page last free pid 3197 tgid 3197 ts 42512083060 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1403 [inline] __free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2954 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:361 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4720 [inline] slab_alloc_node mm/slub.c:5033 [inline] kmem_cache_alloc_noprof+0x264/0x650 mm/slub.c:5047 mt_alloc_one lib/maple_tree.c:139 [inline] mas_alloc_nodes lib/maple_tree.c:1049 [inline] mas_preallocate+0xc22/0xee0 lib/maple_tree.c:5016 vma_iter_prealloc mm/vma.h:698 [inline] commit_merge+0x3ca/0x2700 mm/vma.c:817 vma_expand+0x4a7/0xc80 mm/vma.c:1293 vma_merge_new_range+0x3e6/0xfd0 mm/vma.c:1181 __mmap_region+0xcb1/0x37d0 mm/vma.c:3049 mmap_region+0x3db/0x6d0 mm/vma.c:3136 do_mmap+0x12b6/0x1c10 mm/mmap.c:573 vm_mmap_pgoff+0x1f0/0x3d0 mm/util.c:581 ksys_mmap_pgoff+0x3cb/0x610 mm/mmap.c:619 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:96 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:89 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 Memory state around the buggy address: ffff888114786e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ffff888114786e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc >ffff888114786f00: fa fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff888114786f80: 00 00 04 fc fc fc fc fc fa fb fb fb fc fc fc fc ffff888114787000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================