syzbot


KASAN: slab-use-after-free Read in report_descriptor_read

Status: upstream: reported on 2025/05/24 10:05
Subsystems: usb input
[Documentation on labels]
Reported-by: syzbot+bc537ca7a0efe33988eb@syzkaller.appspotmail.com
First crash: 103d, last: 4d02h
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly input report (Aug 2025) 0 (1) 2025/08/14 12:42
[syzbot] [input?] [usb?] KASAN: slab-use-after-free Read in report_descriptor_read 0 (1) 2025/05/24 10:05

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in report_descriptor_read+0xb5/0x100 drivers/hid/hid-core.c:2209
Read of size 5 at addr ffff8880461cd100 by task fido_id/17641

CPU: 1 UID: 0 PID: 17641 Comm: fido_id Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 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:189
 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105
 report_descriptor_read+0xb5/0x100 drivers/hid/hid-core.c:2209
 kernfs_file_read_iter fs/kernfs/file.c:251 [inline]
 kernfs_fop_read_iter+0x3fe/0x640 fs/kernfs/file.c:280
 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/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4ca2aa7407
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:00007ffeec7c2f40 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f4ca31c1880 RCX: 00007f4ca2aa7407
RDX: 0000000000001000 RSI: 00007ffeec7c2f90 RDI: 0000000000000004
RBP: 000055829d39b730 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000055829d39a930
R13: 00007ffeec7c2f90 R14: 0000000000000004 R15: 000055828fa784d8
 </TASK>

Allocated by task 10341:
 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:388 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
 kasan_kmalloc include/linux/kasan.h:260 [inline]
 __do_kmalloc_node mm/slub.c:4365 [inline]
 __kmalloc_node_track_caller_noprof+0x271/0x4e0 mm/slub.c:4384
 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:1294
 hid_parse include/linux/hid.h:1133 [inline]
 kye_probe+0x21/0x5f0 drivers/hid/hid-kye.c:579
 __hid_device_probe drivers/hid/hid-core.c:2740 [inline]
 hid_device_probe+0x39d/0x710 drivers/hid/hid-core.c:2777
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x26d/0x9e0 drivers/base/dd.c:659
 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462
 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031
 bus_probe_device+0x185/0x260 drivers/base/bus.c:537
 device_add+0x7b6/0xb50 drivers/base/core.c:3689
 hid_add_device+0x398/0x540 drivers/hid/hid-core.c:2923
 usbhid_probe+0xe13/0x12a0 drivers/hid/usbhid/hid-core.c:1435
 usb_probe_interface+0x668/0xc30 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x26d/0x9e0 drivers/base/dd.c:659
 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462
 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031
 bus_probe_device+0x185/0x260 drivers/base/bus.c:537
 device_add+0x7b6/0xb50 drivers/base/core.c:3689
 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/0x9e0 drivers/base/dd.c:659
 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462
 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031
 bus_probe_device+0x185/0x260 drivers/base/bus.c:537
 device_add+0x7b6/0xb50 drivers/base/core.c:3689
 usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694
 hub_port_connect drivers/usb/core/hub.c:5566 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
 port_event drivers/usb/core/hub.c:5870 [inline]
 hub_event+0x2958/0x4a20 drivers/usb/core/hub.c:5952
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
 kthread+0x70e/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x3f9/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 ffff8880461cd100
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 freed 8-byte region [ffff8880461cd100, ffff8880461cd108)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x461cd
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801a441500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080800080 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 15528, tgid 15526 (syz.0.2337), ts 844105863420, free_ts 843919127817
 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+0x21e4/0x22c0 mm/page_alloc.c:3858
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:2487 [inline]
 allocate_slab+0x8a/0x370 mm/slub.c:2655
 new_slab mm/slub.c:2709 [inline]
 ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
 __slab_alloc mm/slub.c:3981 [inline]
 __slab_alloc_node mm/slub.c:4056 [inline]
 slab_alloc_node mm/slub.c:4217 [inline]
 __do_kmalloc_node mm/slub.c:4364 [inline]
 __kmalloc_node_track_caller_noprof+0x2f8/0x4e0 mm/slub.c:4384
 kmemdup_noprof+0x2b/0x70 mm/util.c:138
 kmemdup_noprof include/linux/fortify-string.h:765 [inline]
 key_alloc+0x34d/0x1030 security/keys/key.c:282
 __key_create_or_update+0x8df/0xa30 security/keys/key.c:933
 key_create_or_update+0x42/0x60 security/keys/key.c:1021
 __do_sys_add_key security/keys/keyctl.c:134 [inline]
 __se_sys_add_key+0x329/0x400 security/keys/keyctl.c:74
 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
page last free pid 23 tgid 23 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1395 [inline]
 __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
 pagetable_free include/linux/mm.h:2898 [inline]
 pagetable_dtor_free include/linux/mm.h:2996 [inline]
 __tlb_remove_table+0x2d2/0x3b0 include/asm-generic/tlb.h:220
 __tlb_remove_table_free mm/mmu_gather.c:227 [inline]
 tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290
 rcu_do_batch kernel/rcu/tree.c:2605 [inline]
 rcu_core+0xcab/0x1770 kernel/rcu/tree.c:2861
 handle_softirqs+0x283/0x870 kernel/softirq.c:579
 run_ksoftirqd+0x9b/0x100 kernel/softirq.c:968
 smpboot_thread_fn+0x53f/0xa60 kernel/smpboot.c:160
 kthread+0x70e/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Memory state around the buggy address:
 ffff8880461cd000: fa fc fc fc 05 fc fc fc 05 fc fc fc fa fc fc fc
 ffff8880461cd080: fa fc fc fc fa fc fc fc fa fc fc fc 00 fc fc fc
>ffff8880461cd100: fb fc fc fc fa fc fc fc fa fc fc fc 05 fc fc fc
                   ^
 ffff8880461cd180: fa fc fc fc 04 fc fc fc 05 fc fc fc fa fc fc fc
 ffff8880461cd200: fa fc fc fc 04 fc fc fc fa fc fc fc fa fc fc fc
==================================================================

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/27 09:29 upstream fab1beda7597 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/08/05 11:51 upstream 7e161a991ea7 904e669c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in report_descriptor_read
2025/08/03 22:02 upstream 186f3edfdd41 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/21 21:06 upstream 89be9a83ccf1 0b3788a0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/17 01:50 upstream e2291551827f 44f8051e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/15 03:47 upstream 347e9f5043c8 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/11 20:41 upstream 40f92e79b0aa 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/06/28 21:07 upstream aaf724ed6926 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/06/01 05:29 upstream 4cb6c8af8591 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/05/28 09:27 upstream 015a99fa7665 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/05/22 05:56 upstream d608703fcdd9 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/21 10:43 upstream 89be9a83ccf1 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in report_descriptor_read
2025/06/29 07:32 upstream aaf724ed6926 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in report_descriptor_read
2025/06/04 11:39 upstream 5abc7438f1e9 a30356b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in report_descriptor_read
2025/05/19 22:21 upstream a5806cd506af 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in report_descriptor_read
2025/08/09 18:47 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing c30a13538d9f 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb KASAN: slab-use-after-free Read in report_descriptor_read
2025/08/03 20:45 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 51d4b0a44c82 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/19 17:07 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f72b9aa821a2 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb KASAN: slab-use-after-free Read in report_descriptor_read
2025/07/19 14:13 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f72b9aa821a2 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb KASAN: slab-use-after-free Read in report_descriptor_read
2025/05/22 06:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 342e4955a1f1 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb KASAN: slab-use-after-free Read in report_descriptor_read
* Struck through repros no longer work on HEAD.