================================================================== BUG: KASAN: slab-use-after-free in read_report_descriptor+0xbf/0x100 drivers/hid/hid-core.c:2187 Read of size 40 at addr ffff88813150e780 by task fido_id/1369 CPU: 0 UID: 0 PID: 1369 Comm: fido_id Not tainted syzkaller #0 3e7fae14ba6b85f6920b1ae189ed61b1234f6a84 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:94 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120 print_address_description+0x71/0x210 mm/kasan/report.c:377 print_report+0x4a/0x70 mm/kasan/report.c:481 kasan_report+0x162/0x1a0 mm/kasan/report.c:594 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x25a/0x2b0 mm/kasan/generic.c:189 __asan_memcpy+0x31/0x80 mm/kasan/shadow.c:105 read_report_descriptor+0xbf/0x100 drivers/hid/hid-core.c:2187 sysfs_kf_bin_read+0x1c6/0x200 fs/sysfs/file.c:97 kernfs_file_read_iter fs/kernfs/file.c:269 [inline] kernfs_fop_read_iter+0x30e/0x580 fs/kernfs/file.c:298 new_sync_read fs/read_write.c:489 [inline] vfs_read+0x657/0xcb0 fs/read_write.c:570 ksys_read+0x145/0x260 fs/read_write.c:713 __do_sys_read fs/read_write.c:723 [inline] __se_sys_read fs/read_write.c:721 [inline] __x64_sys_read+0x7f/0x90 fs/read_write.c:721 x64_sys_call+0x2638/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f56ce6a7407 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:00007ffc48e70a10 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f56cedf1880 RCX: 00007f56ce6a7407 RDX: 0000000000001000 RSI: 00007ffc48e70a60 RDI: 0000000000000004 RBP: 000056267185e2c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000056267185d4c0 R13: 00007ffc48e70a60 R14: 0000000000000004 R15: 00005626663724d8 Allocated by task 311: kasan_save_stack mm/kasan/common.c:49 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:70 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396 kasan_kmalloc include/linux/kasan.h:261 [inline] __do_kmalloc_node mm/slub.c:4395 [inline] __kmalloc_node_track_caller_noprof+0x251/0x4f0 mm/slub.c:4414 kmemdup_noprof+0x31/0x80 mm/util.c:139 kmemdup_noprof include/linux/fortify-string.h:753 [inline] hid_open_report+0x200/0x1110 drivers/hid/hid-core.c:1273 hid_parse include/linux/hid.h:1137 [inline] lg_probe+0x28b/0x950 drivers/hid/hid-lg.c:783 __hid_device_probe drivers/hid/hid-core.c:2703 [inline] hid_device_probe+0x2c1/0x5d0 drivers/hid/hid-core.c:2740 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2d8/0x890 drivers/base/dd.c:657 __driver_probe_device+0x198/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459 __device_attach+0x2c9/0x3c0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534 device_add+0x80c/0xbf0 drivers/base/core.c:3692 hid_add_device+0x39b/0x560 drivers/hid/hid-core.c:2886 usbhid_probe+0xde3/0x12b0 drivers/hid/usbhid/hid-core.c:1450 usb_probe_interface+0x6ac/0xc00 drivers/usb/core/driver.c:400 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2d8/0x890 drivers/base/dd.c:657 __driver_probe_device+0x198/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459 __device_attach+0x2c9/0x3c0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534 device_add+0x80c/0xbf0 drivers/base/core.c:3692 usb_set_configuration+0x1acf/0x20b0 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254 usb_probe_device+0x1d1/0x380 drivers/usb/core/driver.c:295 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2d8/0x890 drivers/base/dd.c:657 __driver_probe_device+0x198/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459 __device_attach+0x2c9/0x3c0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534 device_add+0x80c/0xbf0 drivers/base/core.c:3692 usb_new_device+0x9f8/0x15b0 drivers/usb/core/hub.c:2703 hub_port_connect drivers/usb/core/hub.c:5574 [inline] hub_port_connect_change drivers/usb/core/hub.c:5714 [inline] port_event drivers/usb/core/hub.c:5878 [inline] hub_event+0x30c6/0x4700 drivers/usb/core/hub.c:5960 process_one_work kernel/workqueue.c:3261 [inline] process_scheduled_works+0x7d4/0x1020 kernel/workqueue.c:3342 worker_thread+0xc51/0x1370 kernel/workqueue.c:3423 kthread+0x2c9/0x370 kernel/kthread.c:389 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 311: kasan_save_stack mm/kasan/common.c:49 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:70 kasan_save_free_info+0x4a/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:249 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2445 [inline] slab_free mm/slub.c:4714 [inline] kfree+0x158/0x440 mm/slub.c:4875 hid_close_report+0x628/0x6f0 drivers/hid/hid-core.c:720 __hid_device_probe drivers/hid/hid-core.c:2720 [inline] hid_device_probe+0x523/0x5d0 drivers/hid/hid-core.c:2740 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2d8/0x890 drivers/base/dd.c:657 __driver_probe_device+0x198/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459 __device_attach+0x2c9/0x3c0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534 device_add+0x80c/0xbf0 drivers/base/core.c:3692 hid_add_device+0x39b/0x560 drivers/hid/hid-core.c:2886 usbhid_probe+0xde3/0x12b0 drivers/hid/usbhid/hid-core.c:1450 usb_probe_interface+0x6ac/0xc00 drivers/usb/core/driver.c:400 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2d8/0x890 drivers/base/dd.c:657 __driver_probe_device+0x198/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459 __device_attach+0x2c9/0x3c0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534 device_add+0x80c/0xbf0 drivers/base/core.c:3692 usb_set_configuration+0x1acf/0x20b0 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254 usb_probe_device+0x1d1/0x380 drivers/usb/core/driver.c:295 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2d8/0x890 drivers/base/dd.c:657 __driver_probe_device+0x198/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459 __device_attach+0x2c9/0x3c0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534 device_add+0x80c/0xbf0 drivers/base/core.c:3692 usb_new_device+0x9f8/0x15b0 drivers/usb/core/hub.c:2703 hub_port_connect drivers/usb/core/hub.c:5574 [inline] hub_port_connect_change drivers/usb/core/hub.c:5714 [inline] port_event drivers/usb/core/hub.c:5878 [inline] hub_event+0x30c6/0x4700 drivers/usb/core/hub.c:5960 process_one_work kernel/workqueue.c:3261 [inline] process_scheduled_works+0x7d4/0x1020 kernel/workqueue.c:3342 worker_thread+0xc51/0x1370 kernel/workqueue.c:3423 kthread+0x2c9/0x370 kernel/kthread.c:389 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88813150e780 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of freed 64-byte region [ffff88813150e780, ffff88813150e7c0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13150e flags: 0x4000000000000000(zone=1) page_type: f5(slab) raw: 4000000000000000 ffff8881000418c0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000200020 00000001f5000000 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 1362, tgid 1361 (syz.1.354), ts 90827819202, free_ts 52015907746 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1863 prep_new_page+0x2d/0x190 mm/page_alloc.c:1871 get_page_from_freelist+0x496e/0x4a20 mm/page_alloc.c:3948 __alloc_pages_noprof+0x35f/0x7e0 mm/page_alloc.c:5315 alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1 allocate_slab+0x69/0x420 mm/slub.c:2687 new_slab mm/slub.c:2741 [inline] ___slab_alloc+0x5a2/0x8d0 mm/slub.c:3934 __slab_alloc mm/slub.c:4025 [inline] __slab_alloc_node mm/slub.c:4078 [inline] slab_alloc_node mm/slub.c:4239 [inline] __do_kmalloc_node mm/slub.c:4394 [inline] __kmalloc_noprof+0x2fc/0x500 mm/slub.c:4407 kmalloc_noprof include/linux/slab.h:885 [inline] io_cqring_event_overflow+0x7d/0x530 io_uring/io_uring.c:722 io_req_cqe_overflow+0xf5/0x150 io_uring/io_uring.c:752 __io_submit_flush_completions+0x399/0xd90 io_uring/io_uring.c:1479 io_submit_flush_completions io_uring/io_uring.h:150 [inline] io_submit_state_end io_uring/io_uring.c:2279 [inline] io_submit_sqes+0x16d6/0x1b30 io_uring/io_uring.c:2395 __do_sys_io_uring_enter io_uring/io_uring.c:3415 [inline] __se_sys_io_uring_enter+0x326/0x24f0 io_uring/io_uring.c:3346 __x64_sys_io_uring_enter+0xe9/0x110 io_uring/io_uring.c:3346 x64_sys_call+0x2d28/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:427 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 page last free pid 718 tgid 717 stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1390 [inline] free_unref_folios+0xd31/0x16a0 mm/page_alloc.c:2935 folios_put_refs+0x7d9/0x8f0 mm/swap.c:1062 folios_put include/linux/mm.h:1648 [inline] __folio_batch_release+0xac/0x100 mm/swap.c:1122 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x3e4/0xc10 mm/truncate.c:376 truncate_inode_pages+0x28/0x40 mm/truncate.c:456 kill_bdev block/bdev.c:92 [inline] blkdev_flush_mapping+0x10e/0x290 block/bdev.c:693 blkdev_put_whole block/bdev.c:700 [inline] bdev_release+0x433/0x690 block/bdev.c:1125 blkdev_release+0x19/0x30 block/fops.c:635 __fput+0x1fe/0xa00 fs/file_table.c:429 ____fput+0x20/0x30 fs/file_table.c:457 task_work_run+0x1e5/0x260 kernel/task_work.c:246 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0x9ad/0x2720 kernel/exit.c:954 do_group_exit+0x229/0x2f0 kernel/exit.c:1096 get_signal+0x1398/0x14e0 kernel/signal.c:2933 arch_do_signal_or_restart+0xbc/0x760 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x57/0xb0 kernel/entry/common.c:218 Memory state around the buggy address: ffff88813150e680: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff88813150e700: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff88813150e780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88813150e800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88813150e880: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc ==================================================================