================================================================== BUG: KASAN: slab-use-after-free in read_report_descriptor+0xbf/0x100 drivers/hid/hid-core.c:2195 Read of size 8 at addr ffff8881093b33a0 by task fido_id/2734 CPU: 1 UID: 0 PID: 2734 Comm: fido_id Not tainted syzkaller #0 bc0cd8c799b707a1ad12ca137e44006be90c32c1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:94 dump_stack_lvl+0x10c/0x190 lib/dump_stack.c:120 print_address_description+0x71/0x200 mm/kasan/report.c:377 print_report+0x4a/0x70 mm/kasan/report.c:479 kasan_report+0x163/0x1a0 mm/kasan/report.c:592 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x299/0x2a0 mm/kasan/generic.c:189 __asan_memcpy+0x31/0x80 mm/kasan/shadow.c:105 read_report_descriptor+0xbf/0x100 drivers/hid/hid-core.c:2195 sysfs_kf_bin_read+0x1c3/0x200 fs/sysfs/file.c:97 kernfs_file_read_iter fs/kernfs/file.c:251 [inline] kernfs_fop_read_iter+0x310/0x4f0 fs/kernfs/file.c:280 new_sync_read fs/read_write.c:488 [inline] vfs_read+0x53d/0xb60 fs/read_write.c:569 ksys_read+0x141/0x250 fs/read_write.c:712 __do_sys_read fs/read_write.c:722 [inline] __se_sys_read fs/read_write.c:720 [inline] __x64_sys_read+0x7f/0x90 fs/read_write.c:720 x64_sys_call+0x2638/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f74af8a7407 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:00007fffbc7a5a80 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f74aff8e880 RCX: 00007f74af8a7407 RDX: 0000000000001000 RSI: 00007fffbc7a5ad0 RDI: 0000000000000004 RBP: 000055cf20d182c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000055cf20d174c0 R13: 00007fffbc7a5ad0 R14: 0000000000000004 R15: 000055cf01a4e4d8 Allocated by task 571: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4283 [inline] __kmalloc_node_track_caller_noprof+0x1f3/0x490 mm/slub.c:4302 kmemdup_noprof+0x31/0x80 mm/util.c:133 kmemdup_noprof include/linux/fortify-string.h:753 [inline] hid_open_report+0x266/0x1060 drivers/hid/hid-core.c:1241 hid_parse include/linux/hid.h:1124 [inline] lg_probe+0x2d8/0x840 drivers/hid/hid-lg.c:783 __hid_device_probe drivers/hid/hid-core.c:2711 [inline] hid_device_probe+0x2b8/0x5d0 drivers/hid/hid-core.c:2748 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2cf/0x880 drivers/base/dd.c:657 __driver_probe_device+0x195/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+0x25c/0x2f0 drivers/base/bus.c:459 __device_attach+0x2b7/0x3a0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x188/0x270 drivers/base/bus.c:534 device_add+0x82a/0xb60 drivers/base/core.c:3692 hid_add_device+0x39b/0x560 drivers/hid/hid-core.c:2894 usbhid_probe+0xe15/0x1230 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x690/0xbf0 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2cf/0x880 drivers/base/dd.c:657 __driver_probe_device+0x195/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+0x25c/0x2f0 drivers/base/bus.c:459 __device_attach+0x2b7/0x3a0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x188/0x270 drivers/base/bus.c:534 device_add+0x82a/0xb60 drivers/base/core.c:3692 usb_set_configuration+0x1ad1/0x2030 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254 usb_probe_device+0x1cb/0x370 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2cf/0x880 drivers/base/dd.c:657 __driver_probe_device+0x195/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+0x25c/0x2f0 drivers/base/bus.c:459 __device_attach+0x2b7/0x3a0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x188/0x270 drivers/base/bus.c:534 device_add+0x82a/0xb60 drivers/base/core.c:3692 usb_new_device+0x9ed/0x1590 drivers/usb/core/hub.c:2693 hub_port_connect drivers/usb/core/hub.c:5564 [inline] hub_port_connect_change drivers/usb/core/hub.c:5704 [inline] port_event drivers/usb/core/hub.c:5868 [inline] hub_event+0x2758/0x4210 drivers/usb/core/hub.c:5950 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0x7d2/0x1020 kernel/workqueue.c:3310 worker_thread+0x99f/0xd90 kernel/workqueue.c:3391 kthread+0x2ca/0x370 kernel/kthread.c:389 ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 571: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x4a/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2355 [inline] slab_free mm/slub.c:4598 [inline] kfree+0x183/0x3b0 mm/slub.c:4746 hid_close_report+0x628/0x6f0 drivers/hid/hid-core.c:688 __hid_device_probe drivers/hid/hid-core.c:2728 [inline] hid_device_probe+0x517/0x5d0 drivers/hid/hid-core.c:2748 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2cf/0x880 drivers/base/dd.c:657 __driver_probe_device+0x195/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+0x25c/0x2f0 drivers/base/bus.c:459 __device_attach+0x2b7/0x3a0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x188/0x270 drivers/base/bus.c:534 device_add+0x82a/0xb60 drivers/base/core.c:3692 hid_add_device+0x39b/0x560 drivers/hid/hid-core.c:2894 usbhid_probe+0xe15/0x1230 drivers/hid/usbhid/hid-core.c:1435 usb_probe_interface+0x690/0xbf0 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2cf/0x880 drivers/base/dd.c:657 __driver_probe_device+0x195/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+0x25c/0x2f0 drivers/base/bus.c:459 __device_attach+0x2b7/0x3a0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x188/0x270 drivers/base/bus.c:534 device_add+0x82a/0xb60 drivers/base/core.c:3692 usb_set_configuration+0x1ad1/0x2030 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254 usb_probe_device+0x1cb/0x370 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2cf/0x880 drivers/base/dd.c:657 __driver_probe_device+0x195/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+0x25c/0x2f0 drivers/base/bus.c:459 __device_attach+0x2b7/0x3a0 drivers/base/dd.c:1029 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078 bus_probe_device+0x188/0x270 drivers/base/bus.c:534 device_add+0x82a/0xb60 drivers/base/core.c:3692 usb_new_device+0x9ed/0x1590 drivers/usb/core/hub.c:2693 hub_port_connect drivers/usb/core/hub.c:5564 [inline] hub_port_connect_change drivers/usb/core/hub.c:5704 [inline] port_event drivers/usb/core/hub.c:5868 [inline] hub_event+0x2758/0x4210 drivers/usb/core/hub.c:5950 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0x7d2/0x1020 kernel/workqueue.c:3310 worker_thread+0x99f/0xd90 kernel/workqueue.c:3391 kthread+0x2ca/0x370 kernel/kthread.c:389 ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff8881093b33a0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of freed 8-byte region [ffff8881093b33a0, ffff8881093b33a8) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1093b3 flags: 0x4000000000000000(zone=1) page_type: f5(slab) raw: 4000000000000000 ffff888100041500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000800080 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (init), ts 4772296452, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x249/0x3a0 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1562 [inline] get_page_from_freelist+0x3d40/0x3de0 mm/page_alloc.c:3507 __alloc_pages_noprof+0x23a/0x4e0 mm/page_alloc.c:4793 alloc_slab_page include/linux/sched.h:-1 [inline] allocate_slab+0xbe/0x540 mm/slub.c:2595 new_slab mm/slub.c:2649 [inline] ___slab_alloc+0x59a/0x920 mm/slub.c:3837 __slab_alloc mm/slub.c:3927 [inline] __slab_alloc_node mm/slub.c:3980 [inline] slab_alloc_node mm/slub.c:4141 [inline] __do_kmalloc_node mm/slub.c:4282 [inline] __kmalloc_node_track_caller_noprof+0x278/0x490 mm/slub.c:4302 kstrdup+0x88/0x100 mm/util.c:64 get_permissions_callback+0x4a/0xa0 security/selinux/ss/services.c:3398 hashtab_map+0x10d/0x210 security/selinux/ss/hashtab.c:97 security_get_permissions+0x16a/0x390 security/selinux/ss/services.c:3430 sel_make_perm_files security/selinux/selinuxfs.c:1775 [inline] sel_make_class_dir_entries security/selinux/selinuxfs.c:1835 [inline] sel_make_classes security/selinux/selinuxfs.c:1864 [inline] sel_make_policy_nodes+0xcd7/0x12d0 security/selinux/selinuxfs.c:537 sel_write_load+0x38f/0x560 security/selinux/selinuxfs.c:609 vfs_write+0x392/0xe40 fs/read_write.c:681 ksys_write+0x141/0x250 fs/read_write.c:736 __do_sys_write fs/read_write.c:748 [inline] __se_sys_write fs/read_write.c:745 [inline] __x64_sys_write+0x7f/0x90 fs/read_write.c:745 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2 page_owner free stack trace missing Memory state around the buggy address: ffff8881093b3280: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ffff8881093b3300: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc >ffff8881093b3380: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ^ ffff8881093b3400: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ffff8881093b3480: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc ==================================================================