================================================================== BUG: KASAN: slab-use-after-free in report_descriptor_read+0xb5/0x100 drivers/hid/hid-core.c:2196 Read of size 5 at addr ffff88805a2dab00 by task fido_id/21147 CPU: 1 UID: 0 PID: 21147 Comm: fido_id Not tainted 6.16.0-rc3-syzkaller-00306-gaaf724ed6926 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 report_descriptor_read+0xb5/0x100 drivers/hid/hid-core.c:2196 kernfs_file_read_iter fs/kernfs/file.c:251 [inline] kernfs_fop_read_iter+0x3fb/0x640 fs/kernfs/file.c:280 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x4d0/0x980 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/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f00397d5407 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:00007ffdb9272520 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f0039749880 RCX: 00007f00397d5407 RDX: 0000000000001000 RSI: 00007ffdb9272570 RDI: 0000000000000004 RBP: 000055fa2223f730 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000055fa2223e930 R13: 00007ffdb9272570 R14: 0000000000000004 R15: 000055f9eb2964d8 Allocated by task 11370: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kmalloc_node_track_caller_noprof+0x271/0x4e0 mm/slub.c:4347 kmemdup_noprof+0x2b/0x70 mm/util.c:137 kmemdup_noprof include/linux/fortify-string.h:765 [inline] hid_open_report+0x208/0xee0 drivers/hid/hid-core.c:1290 hid_parse include/linux/hid.h:1133 [inline] lg_probe+0x270/0x7d0 drivers/hid/hid-lg.c:783 __hid_device_probe drivers/hid/hid-core.c:2724 [inline] hid_device_probe+0x3a0/0x710 drivers/hid/hid-core.c:2761 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1029 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3692 hid_add_device+0x398/0x540 drivers/hid/hid-core.c:2907 usbhid_probe+0xe13/0x12a0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x641/0xbc0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1029 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3692 usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1029 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3692 usb_new_device+0xa39/0x16c0 drivers/usb/core/hub.c:2663 hub_port_connect drivers/usb/core/hub.c:5535 [inline] hub_port_connect_change drivers/usb/core/hub.c:5675 [inline] port_event drivers/usb/core/hub.c:5835 [inline] hub_event+0x2941/0x4a00 drivers/usb/core/hub.c:5917 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 11370: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x18e/0x440 mm/slub.c:4842 hid_close_report+0x632/0x720 drivers/hid/hid-core.c:727 __hid_device_probe drivers/hid/hid-core.c:2741 [inline] hid_device_probe+0x5e9/0x710 drivers/hid/hid-core.c:2761 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1029 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3692 hid_add_device+0x398/0x540 drivers/hid/hid-core.c:2907 usbhid_probe+0xe13/0x12a0 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x641/0xbc0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1029 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3692 usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1029 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3692 usb_new_device+0xa39/0x16c0 drivers/usb/core/hub.c:2663 hub_port_connect drivers/usb/core/hub.c:5535 [inline] hub_port_connect_change drivers/usb/core/hub.c:5675 [inline] port_event drivers/usb/core/hub.c:5835 [inline] hub_event+0x2941/0x4a00 drivers/usb/core/hub.c:5917 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88805a2dab00 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of freed 8-byte region [ffff88805a2dab00, ffff88805a2dab08) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5a2da flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801a441500 dead000000000100 dead000000000122 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5845, tgid 5845 (syz-executor), ts 95778389343, free_ts 95778370450 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_node_noprof+0x2fd/0x4e0 mm/slub.c:4334 kmalloc_node_noprof include/linux/slab.h:932 [inline] __vmalloc_area_node mm/vmalloc.c:3690 [inline] __vmalloc_node_range_noprof+0x5a9/0x12f0 mm/vmalloc.c:3885 __vmalloc_node_noprof mm/vmalloc.c:3948 [inline] vmalloc_noprof+0xb2/0xf0 mm/vmalloc.c:3981 xt_compat_init_offsets+0xd3/0x1c0 net/netfilter/x_tables.c:733 compat_table_info+0x99/0xa90 net/ipv6/netfilter/ip6_tables.c:950 get_info net/ipv6/netfilter/ip6_tables.c:987 [inline] do_ip6t_get_ctl+0x80c/0x1180 net/ipv6/netfilter/ip6_tables.c:1668 nf_getsockopt+0x26b/0x290 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1ed/0x290 net/ipv6/ipv6_sockglue.c:1493 do_sock_getsockopt+0x360/0x650 net/socket.c:2357 __sys_getsockopt+0x128/0x1d0 net/socket.c:2386 page last free pid 5845 tgid 5845 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 __kasan_populate_vmalloc mm/kasan/shadow.c:383 [inline] kasan_populate_vmalloc+0x18a/0x1a0 mm/kasan/shadow.c:417 alloc_vmap_area+0xd51/0x1490 mm/vmalloc.c:2084 __get_vm_area_node+0x1f8/0x300 mm/vmalloc.c:3179 __vmalloc_node_range_noprof+0x301/0x12f0 mm/vmalloc.c:3845 __vmalloc_node_noprof mm/vmalloc.c:3948 [inline] vmalloc_noprof+0xb2/0xf0 mm/vmalloc.c:3981 xt_compat_init_offsets+0xd3/0x1c0 net/netfilter/x_tables.c:733 compat_table_info+0x99/0xa90 net/ipv6/netfilter/ip6_tables.c:950 get_info net/ipv6/netfilter/ip6_tables.c:987 [inline] do_ip6t_get_ctl+0x80c/0x1180 net/ipv6/netfilter/ip6_tables.c:1668 nf_getsockopt+0x26b/0x290 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1ed/0x290 net/ipv6/ipv6_sockglue.c:1493 do_sock_getsockopt+0x360/0x650 net/socket.c:2357 __sys_getsockopt+0x128/0x1d0 net/socket.c:2386 __do_compat_sys_socketcall net/compat.c:494 [inline] __se_compat_sys_socketcall net/compat.c:423 [inline] __ia32_compat_sys_socketcall+0x824/0x9c0 net/compat.c:423 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 Memory state around the buggy address: ffff88805a2daa00: fa fc fc fc fa fc fc fc 05 fc fc fc 05 fc fc fc ffff88805a2daa80: 00 fc fc fc fa fc fc fc 05 fc fc fc fa fc fc fc >ffff88805a2dab00: fa fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ^ ffff88805a2dab80: 06 fc fc fc 05 fc fc fc fa fc fc fc fa fc fc fc ffff88805a2dac00: fa fc fc fc fa fc fc fc 05 fc fc fc fa fc fc fc ==================================================================