syzbot


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

Status: premoderation: reported C repro on 2025/06/29 07:21
Bug presence: origin:downstream
[Documentation on labels]
Reported-by: syzbot+2b1f186fd55a4f8f9912@syzkaller.appspotmail.com
First crash: 45d, last: 28d
Bug presence (3)
Date Name Commit Repro Result
2025/06/30 android16-6.12 (ToT) 668635cd345a C [report] KASAN: slab-use-after-free Read in read_report_descriptor
2025/06/30 lts (merge base) e0e2f7824338 C Didn't crash
2025/06/30 upstream (ToT) d0b3b7b22dfa C Didn't crash
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 KASAN: slab-use-after-free Read in read_report_descriptor 19 1 5d22h 5d22h 0/2 upstream: reported on 2025/08/07 13:50
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/07/15 15:24 18m retest repro android16-6.12 OK log
2025/07/15 15:24 14m retest repro android16-6.12 report log

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in read_report_descriptor+0xbf/0x100 drivers/hid/hid-core.c:2186
Read of size 8 at addr ffff88810be60220 by task fido_id/2761

CPU: 0 UID: 0 PID: 2761 Comm: fido_id Not tainted 6.12.30-syzkaller-g68f4f0b0690a #0 d2d57a621586a6800997b547ec5ef233d70fc6ad
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x10c/0x190 lib/dump_stack.c:120
 print_address_description+0x71/0x220 mm/kasan/report.c:377
 print_report+0x4a/0x70 mm/kasan/report.c:488
 kasan_report+0x163/0x1a0 mm/kasan/report.c:601
 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:2186
 sysfs_kf_bin_read+0x1c6/0x200 fs/sysfs/file.c:97
 kernfs_file_read_iter fs/kernfs/file.c:251 [inline]
 kernfs_fop_read_iter+0x2c7/0x520 fs/kernfs/file.c:280
 new_sync_read fs/read_write.c:489 [inline]
 vfs_read+0x53d/0xb60 fs/read_write.c:570
 ksys_read+0x141/0x250 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:52 [inline]
 do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f4bdd4a7407
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:00007ffcca183570 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f4bddc3e880 RCX: 00007f4bdd4a7407
RDX: 0000000000001000 RSI: 00007ffcca1835c0 RDI: 0000000000000004
RBP: 000055b9197212c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000055b9197204c0
R13: 00007ffcca1835c0 R14: 0000000000000004 R15: 000055b9101744d8
 </TASK>

Allocated by task 388:
 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:4347 [inline]
 __kmalloc_node_track_caller_noprof+0x1ad/0x440 mm/slub.c:4366
 kmemdup_noprof+0x31/0x80 mm/util.c:139
 kmemdup_noprof include/linux/fortify-string.h:753 [inline]
 hid_open_report+0x1f2/0x1110 drivers/hid/hid-core.c:1241
 hid_parse include/linux/hid.h:1137 [inline]
 lg_probe+0x28d/0x920 drivers/hid/hid-lg.c:783
 __hid_device_probe drivers/hid/hid-core.c:2702 [inline]
 hid_device_probe+0x2c1/0x5d0 drivers/hid/hid-core.c:2739
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d3/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+0x260/0x2f0 drivers/base/bus.c:459
 __device_attach+0x2bd/0x3a0 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/0xc00 drivers/base/core.c:3692
 hid_add_device+0x39b/0x560 drivers/hid/hid-core.c:2885
 usbhid_probe+0xde3/0x12b0 drivers/hid/usbhid/hid-core.c:1432
 usb_probe_interface+0x696/0xc00 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d3/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+0x260/0x2f0 drivers/base/bus.c:459
 __device_attach+0x2bd/0x3a0 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/0xc00 drivers/base/core.c:3692
 usb_set_configuration+0x1ad4/0x20b0 drivers/usb/core/message.c:2210
 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254
 usb_probe_device+0x1d4/0x380 drivers/usb/core/driver.c:294
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d3/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+0x260/0x2f0 drivers/base/bus.c:459
 __device_attach+0x2bd/0x3a0 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/0xc00 drivers/base/core.c:3692
 usb_new_device+0x9ed/0x1590 drivers/usb/core/hub.c:2662
 hub_port_connect drivers/usb/core/hub.c:5533 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5673 [inline]
 port_event drivers/usb/core/hub.c:5833 [inline]
 hub_event+0x265b/0x41a0 drivers/usb/core/hub.c:5915
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x7d2/0x1020 kernel/workqueue.c:3319
 worker_thread+0xc58/0x1250 kernel/workqueue.c:3400
 kthread+0x2ca/0x370 kernel/kthread.c:389
 ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Freed by task 388:
 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:2413 [inline]
 slab_free mm/slub.c:4662 [inline]
 kfree+0x156/0x400 mm/slub.c:4813
 hid_close_report+0x628/0x6f0 drivers/hid/hid-core.c:688
 __hid_device_probe drivers/hid/hid-core.c:2719 [inline]
 hid_device_probe+0x523/0x5d0 drivers/hid/hid-core.c:2739
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d3/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+0x260/0x2f0 drivers/base/bus.c:459
 __device_attach+0x2bd/0x3a0 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/0xc00 drivers/base/core.c:3692
 hid_add_device+0x39b/0x560 drivers/hid/hid-core.c:2885
 usbhid_probe+0xde3/0x12b0 drivers/hid/usbhid/hid-core.c:1432
 usb_probe_interface+0x696/0xc00 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d3/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+0x260/0x2f0 drivers/base/bus.c:459
 __device_attach+0x2bd/0x3a0 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/0xc00 drivers/base/core.c:3692
 usb_set_configuration+0x1ad4/0x20b0 drivers/usb/core/message.c:2210
 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254
 usb_probe_device+0x1d4/0x380 drivers/usb/core/driver.c:294
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d3/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+0x260/0x2f0 drivers/base/bus.c:459
 __device_attach+0x2bd/0x3a0 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/0xc00 drivers/base/core.c:3692
 usb_new_device+0x9ed/0x1590 drivers/usb/core/hub.c:2662
 hub_port_connect drivers/usb/core/hub.c:5533 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5673 [inline]
 port_event drivers/usb/core/hub.c:5833 [inline]
 hub_event+0x265b/0x41a0 drivers/usb/core/hub.c:5915
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x7d2/0x1020 kernel/workqueue.c:3319
 worker_thread+0xc58/0x1250 kernel/workqueue.c:3400
 kthread+0x2ca/0x370 kernel/kthread.c:389
 ret_from_fork+0x64/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 ffff88810be60220
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 freed 8-byte region [ffff88810be60220, ffff88810be60228)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10be60
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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 2152456326, free_ts 1703576908
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook+0x3b9/0x3f0 mm/page_alloc.c:1795
 prep_new_page+0x1c/0x120 mm/page_alloc.c:1803
 get_page_from_freelist+0x46bb/0x4750 mm/page_alloc.c:3854
 __alloc_pages_noprof+0x30d/0x6c0 mm/page_alloc.c:5186
 alloc_slab_page+0x6b/0x1f0 mm/slub.c:-1
 allocate_slab+0x69/0x440 mm/slub.c:2655
 new_slab mm/slub.c:2709 [inline]
 ___slab_alloc+0x59a/0x8b0 mm/slub.c:3897
 __slab_alloc mm/slub.c:3987 [inline]
 __slab_alloc_node mm/slub.c:4040 [inline]
 slab_alloc_node mm/slub.c:4201 [inline]
 __do_kmalloc_node mm/slub.c:4346 [inline]
 __kmalloc_node_track_caller_noprof+0x23a/0x440 mm/slub.c:4366
 kmemdup_nul+0x5a/0x1a0 mm/util.c:200
 vfs_parse_fs_string+0xcc/0x170 fs/fs_context.c:182
 vfs_kern_mount+0x76/0x170 fs/namespace.c:1257
 kern_mount+0x47/0xa0 fs/namespace.c:5585
 init_pipe_fs+0x3c/0xa0 fs/pipe.c:1510
 do_one_initcall+0x1a5/0x670 init/main.c:1299
 do_initcall_level+0x16f/0x2e5 init/main.c:1361
 do_initcalls+0x7e/0x170 init/main.c:1377
page last free pid 1 tgid 1 stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1321 [inline]
 free_unref_page+0xae5/0xdd0 mm/page_alloc.c:2810
 __free_pages+0x6b/0x3b0 mm/page_alloc.c:5273
 __free_slab+0xb6/0x110 mm/slub.c:2726
 free_slab+0x18/0xf0 mm/slub.c:2749
 discard_slab mm/slub.c:2755 [inline]
 __put_partials+0x11b/0x150 mm/slub.c:3224
 put_cpu_partial+0x91/0xc0 mm/slub.c:3299
 __slab_free+0x1d3/0x2b0 mm/slub.c:4532
 do_slab_free mm/slub.c:4614 [inline]
 ___cache_free+0xc9/0xe0 mm/slub.c:4723
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0xb5/0x130 mm/kasan/quarantine.c:179
 kasan_quarantine_remove_cache+0x1df/0x360 mm/kasan/quarantine.c:364
 kasan_cache_shrink+0xd/0x20 mm/kasan/generic.c:206
 kmem_cache_shrink+0x11/0x30 mm/slab_common.c:556
 acpi_os_purge_cache+0x19/0x30 drivers/acpi/osl.c:1573
 acpi_purge_cached_objects+0x41/0xd0 drivers/acpi/acpica/utxface.c:237
 acpi_initialize_objects+0x32/0xb0 drivers/acpi/acpica/utxfinit.c:250
 acpi_bus_init+0xcf/0x6d0 drivers/acpi/bus.c:1367

Memory state around the buggy address:
 ffff88810be60100: fa fc fc fc 05 fc fc fc 06 fc fc fc 05 fc fc fc
 ffff88810be60180: 06 fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
>ffff88810be60200: fa fc fc fc fa fc fc fc 05 fc fc fc 05 fc fc fc
                               ^
 ffff88810be60280: fa fc fc fc fa fc fc fc 05 fc fc fc fa fc fc fc
 ffff88810be60300: fa fc fc fc fa fc fc fc fa fc fc fc 06 fc fc fc
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/29 19:56 android16-6.12 68f4f0b0690a fc9d8ee5 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
2025/06/29 10:12 android16-6.12 68f4f0b0690a fc9d8ee5 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
2025/07/01 13:00 android16-6.12 648383294760 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
2025/06/30 20:00 android16-6.12 668635cd345a 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
2025/06/30 02:36 android16-6.12 68f4f0b0690a fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
2025/06/29 14:51 android16-6.12 68f4f0b0690a fc9d8ee5 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
2025/06/29 07:20 android16-6.12 68f4f0b0690a fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in read_report_descriptor
* Struck through repros no longer work on HEAD.